Subject | Re: [maybe OT] where [not] singular |
---|---|
Author | duilio_fos |
Post date | 2002-11-27T22:21:10Z |
I just learnt (from Arno Brinkman) that the following instruction
will delete all the rows in TableA that have the same value in column
dub_keys EXCEPT ONE.
I find this instruction unbelievely useful when I want to get rid of
unwanted duplicates and (of all duplicates) have just one left.
However I am puzzled by the logic behind the SINGULAR keyword.
It seems foreign to the usual union/intersection logic found in SQL.
Was the keyword created (in IB alone ?) in reason of its usefulness ?
Thank you
Duilio Foschi
> DELETE FROMt1.DUB_KEYS)
> TableA t1
> WHERE
> NOT SINGULAR(SELECT * FROM TableA t2 WHERE t2.DUB_KEYS =
will delete all the rows in TableA that have the same value in column
dub_keys EXCEPT ONE.
I find this instruction unbelievely useful when I want to get rid of
unwanted duplicates and (of all duplicates) have just one left.
However I am puzzled by the logic behind the SINGULAR keyword.
It seems foreign to the usual union/intersection logic found in SQL.
Was the keyword created (in IB alone ?) in reason of its usefulness ?
Thank you
Duilio Foschi