[GENERAL] remote duplicate rows

2006-09-13 Thread Junkone
hI i have a bad situation that i did not have primary key. so i have a table like this colname1colname2 1 apple 1 apple 2 orange 2 orange It is a very

Re: [GENERAL] remote duplicate rows

2006-09-13 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/13/06 19:36, ljb wrote: > [EMAIL PROTECTED] wrote: >> hI >> i have a bad situation that i did not have primary key. so i have a >> table like this >> colname1colname2 >> 1 apple >> 1

Re: [GENERAL] remote duplicate rows

2006-09-13 Thread A. Kretschmer
am Wed, dem 13.09.2006, um 15:46:58 -0700 mailte Junkone folgendes: > hI > i have a bad situation that i did not have primary key. so i have a > table like this > colname1colname2 > 1 apple > 1 apple > 2

Re: [GENERAL] remote duplicate rows

2006-09-14 Thread John Sidney-Woollett
If you have a primary key value (or OID?) then you can delete the duplicates in situ using something like (untested) -- should work if never more than 1 duplicate row for colname1, colname2 delete from table where pk_value in ( select min(pk_value) from table group by colname1, colname2 having

Re: [GENERAL] remote duplicate rows

2006-09-14 Thread Andrews, Chris
n it and shove it back in... -Original Message- From: Junkone [mailto:[EMAIL PROTECTED] Sent: 13 September 2006 23:47 To: pgsql-general@postgresql.org Subject: [GENERAL] remote duplicate rows hI i have a bad situation that i did not have primary key. so i have a table like this colname1

Re: [GENERAL] remote duplicate rows

2006-09-14 Thread Berend Tober
A. Kretschmer wrote: am Wed, dem 13.09.2006, um 15:46:58 -0700 mailte Junkone folgendes: hI i have a bad situation that i did not have primary key. so i have a table like this colname1colname2 1 apple 1 apple 2

Re: [GENERAL] remote duplicate rows

2006-09-16 Thread Junkone
it > and > shove it back in... > > > > -Original Message- > From: Junkone [mailto:[EMAIL PROTECTED] > Sent: 13 September 2006 23:47 > To: pgsql-general@postgresql.org > Subject: [GENERAL] remote duplicate rows > > > hI >

Re: [GENERAL] remote duplicate rows

2006-09-17 Thread Sim Zacks
You forgot to mention that all the functions/views that utilized that table also now point to the original table with the changed name, because it doesn't store the table name, it stores the table oid. Berend Tober wrote: A. Kretschmer wrote: am Wed, dem 13.09.2006, um 15:46:58 -0700 mailte