Hey Sherwin,
You da man!
Your statement worked great, I just had to put parentheses around key:
i.e.
DISTINCT ON (key)
Thank you very much.
Chris.
>>> "pgsql-admin" <[EMAIL PROTECTED]> 10/29/00 09:42PM >>>
try
INSERT INTO table2
SELECT DISTINCT ON key key, name, field1, field2
FROM tabl
try
INSERT INTO table2
SELECT DISTINCT ON key key, name, field1, field2
FROM table1;
sherwin
[EMAIL PROTECTED] writes:
>Hello,
>
>I'm sure I'll be flagged as a moron for asking this question, so be it.
>
>I have some tables of info with no primary keys. As a result the field I
>want to key
Hello,
I'm sure I'll be flagged as a moron for asking this question, so be it.
I have some tables of info with no primary keys. As a result the field I want to key
on is repeated. My plan is to do a DISTINCT select from the un-keyed table into
another table that does have constraints.
Here