Will this work for you: update duptest set nonid = 'c' WHERE ROWID IN (SELECT MIN (ROWID) FROM duptest GROUP BY id, nonid).
This worked for me, even for repeated runs. --third, update the one row UPDATE DUPTEST DT SET DT. NONID = 'c' WHERE (DT.ID,DT.
ROWID) IN( --second, find the row id of the first dup SELECT DT. ID ,MIN(DT. ROWID) AS FIRST_ROW_ID FROM DUPTEST DT WHERE ID IN( --first, find the dups SELECT ID FROM DUPTEST GROUP BY ID HAVING COUNT(*) > 1 ) GROUP BY DT.
ID ).
I think this should work. UPDATE DUPTEST SET NONID = 'C' WHERE ROWID in ( Select ROWID from ( SELECT ROWID, Row_Number() over (Partition By ID, NONID order by ID) rn ) WHERE rn = 1 ).
UPDATE duptest SET nonid = 'c' WHERE nonid = 'b' AND rowid = (SELECT min(rowid) FROM duptest WHERE nonid = 'b').
I know that this does not answer your initial question, but there is no key on your table and the problem you have adressing a specific row results from that. So my suggestion - if the specific application allows for it - would be to add a key column to your table (e.g. REAL_ID as INTEGER). Then you could find out the lowest id for the duplicates select min (real_id) from duptest group by (id, nonid) and update just these rows: update duptest set nonid = 'C' where real_id in () I'm sure the update statement can be tuned somewhat, but I hope it illustrates the idea.
The advantage is a "cleaner" design (your id column is not really an id), and a more portable solution than relying on the DB-specific versions of rowid.
Kogus, You are the boss! I’ve tried so many options, variations, here and there and your’s was the key, the bull's eye! Thank you very much!
Philadelphia PHILLIES - 2008 WORLD CHAMPIANS!
So... flag his answer as the accepted solution – Jaap Coomans Dec 16 '08 at 8:30.
I know that this does not answer your initial question, but there is no key on your table and the problem you have adressing a specific row results from that. So my suggestion - if the specific application allows for it - would be to add a key column to your table (e.g. REAL_ID as INTEGER). I'm sure the update statement can be tuned somewhat, but I hope it illustrates the idea.
The advantage is a "cleaner" design (your id column is not really an id), and a more portable solution than relying on the DB-specific versions of rowid.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.