Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: "Not in" subquery

Re: "Not in" subquery

From: Thomas Sommerfeld <TSommerfeld_at_gmx.de>
Date: Thu, 07 Jun 2007 12:10:27 +0200
Message-ID: <f48lpm$hlm$1@online.de>


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.de
Received on Thu Jun 07 2007 - 05:10:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US