: MIDRANGE dot COM Mailing List Archive

Re: Delete with an exception join


AddThis Feed Button


If all 3 fields are character and you don't have to worry about performance, concatenate them

delete from tab1 where fld1 concat fld2 concat fld3 not in (select fld1 concat fld2 concat fld3 from tab2)

I don't see the need for the exception join in the nested table expression

HTH
Vern

Servizi Aziendali - Massimo Ceroni wrote:
Hi.
I need to delete records from tab1 that doesn't exist in tab2. The join between tab1 and tab2 is on 3 key fields, so that I can't use the sintax:
delete from tab1 where fld1 not in (select fld1 from tab1 exception join tab2 on ...)
Tanks for any help.

Massimo Ceroni





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2010 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact