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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: NESTED MINUS?

RE: NESTED MINUS?

From: Jack C. Applewhite <japplewhite_at_inetprofit.com>
Date: Wed, 07 Feb 2001 13:43:28 -0800
Message-ID: <F001.002AE4C1.20010207134157@fatcity.com>

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
japplewhite_at_inetprofit.com

-----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-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).
Received on Wed Feb 07 2001 - 15:43:28 CST

Original text of this message

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