The syntax is only OK without the "table"'s in it.  I think you might be
seeing some extra underscores where they aren't.  If I run the sql exactly
as it is in this message, I get the same error message stated here.  Here is
the output:

  1      select * from table A where A.f1 in (
  2          select f1 from table A
  3              minus
  4*         select f1 from table B)
SQL> /
    select * from table A where A.f1 in (
                        *
ERROR at line 1:
ORA-00906: missing left parenthesis

> -----Original Message-----
> From: Jack C. Applewhite [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 3:42 PM
> To:   Multiple recipients of list ORACLE-L
> Subject:      RE: NESTED MINUS?
> 
> Mike,
> 
> It's not only possible, but I do it all the time.  In fact I
> just did a query against our database that had a Union
> nested within a Minus nested within an Intersect - not often
> I get to use all three in the same statement!  This
> particular Select hit several tables of over a million rows
> each, with very nice performance - even on Win2k!
> 
> Your problem might be as simple as SQL*Plus getting stupid
> (it happens).  Try moving the initial parenthesis down to in
> front of the select on the next line.  It may not solve your
> problem, but might.  Your syntax is perfectly OK.
> 
> Jack
> 
> --------------------------------
> Jack C. Applewhite
> Database Administrator/Developer
> OCP Oracle8 DBA
> iNetProfit, Inc.
> Austin, Texas
> www.iNetProfit.com
> [EMAIL PROTECTED]
> 
> 
> -----Original Message-----
> Mike
> Lanteigne
> Sent: Wednesday, February 07, 2001 2:13 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> 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: Jack C. Applewhite
>   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