Try taking out the "table"'s .  This is illegal syntax.  

    select * from A where A.f1 in (
        select f1 from A
            minus
        select f1 from B);

The sql above is also very inefficient.  You don't need to do the minus.
Here is the correct syntax:

    select * from A where A.f1 not in (
        select f1 from B);

> -----Original Message-----
> From: Mike Lanteigne [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 2:13 PM
> To:   Multiple recipients of list ORACLE-L
> Subject:      NESTED MINUS?
> 
> Hi all,
> 
> can you use the minus operator in nested sql
> eg
>     select * from table A where A.f1 in (
>         select f1 from table A
>             minus
>         select f1 from table B);
> 
> I'm getting a "missing right parenthesis" error, so I think it may not be
> possible!
> 
> Thanks
> 
> Mike
> 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Mike Lanteigne
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Elliott, Patrick
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to