Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "Not in" subquery
colmkav schrieb:
> Are you sure you get the same results?
>
> I have just tried to apply the same logic to my query and get no data
> using the not exists method. WHat have I dont wrong?
>
> query1:
>
> select strategy from t_bookmap where strategy not in (select strategy
> from ta_strategy where SourceId = 1)
>
> query2:
>
> select strategy from t_bookmap where not exists (select strategy from
> ta_strategy where SourceId = 1)
>
Hi,
try
select strategy from t_bookmap where not exists (select strategy from
ta_strategy where SourceId = 1 and ta_strategy.strategy =
t_bookmap.strategy);
Regards
Thomas
-- For answers by personal mail use: thomas.sommerfeld at domain ust-gmbh.deReceived on Thu Jun 07 2007 - 05:10:27 CDT