Re: Oracle SQL Condition Question...

From: Rodney Patterson <rodney.patterson_at_norfokva.ncr.com>
Date: 1998/04/24
Message-ID: <01bd6f8c$1df768e0$4b5c5499_at_patter.dsdus>#1/1


Try
 Insert into tab3
 ( select * from tab1 where not exists

                         (select 'x' from tab2
		  where tab1.f1=tab2.f2));

much faster

Bhavesh Gosar <gosar_at_EBB.Eng.Sun.COM> wrote in article <6hg4p8$se0$1_at_engnews2.Eng.Sun.COM>...
>
> Insert into tab3 ( select * from tab1 where tab1.f1 not in
> (select distinct tab2.f2 from tab2));
>
> The problem is this SQL takes around 40-45 hours to execute...
Received on Fri Apr 24 1998 - 00:00:00 CEST

Original text of this message