Hi Gurus!
I have a table with 2 cols colA and colB.
The data is as follows:
colA colB
john smith
smith john
I wish to select only one of these rows, or I wish to even delete one of these rows.
How would I do it?
Thanks!
Printable View
Hi Gurus!
I have a table with 2 cols colA and colB.
The data is as follows:
colA colB
john smith
smith john
I wish to select only one of these rows, or I wish to even delete one of these rows.
How would I do it?
Thanks!
your delete statment should be like this:
------------------------------------------------------
delete from your_table t1
where rowid < (select max(rowid) from your_table t2
where
t1.colA || ' ' ||t1.colB = t2.colA || ' ' ||t2.colB
or
t1.colA || ' ' ||t1.colB = t2.colB || ' ' ||t2.colA)
;
------------------------------------------------------
Thanks a deal Shestakov!