Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> 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
-----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: japplewhite_at_inetprofit.com 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: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Wed Feb 07 2001 - 15:43:28 CST
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).