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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help constructing a query (UNION or subselect)

Re: Help constructing a query (UNION or subselect)

From: Tim McNerney <tmcnerney_at_truis.com>
Date: 30 May 2001 22:56:54 GMT
Message-ID: <3B1579AF.4D293193@truis.com>

Tim McNerney wrote:

> But I need to be able to do this for arbitrary criteria. I believe a
> UNION would work where the above first example would be:
>
> SELECT t0.NAME from t0 OBJECT, t1 ATTRIBUTE
> where (t0.ID = t1.OID) and (t1.TYPE = 2) and (t1.VALUE = 1)
> UNION
> SELECT t0.NAME from t0 OBJECT, t1 ATTRIBUTE
> where (t0.ID = t1.OID) and (t1.TYPE = 3) and (t1.VALUE = 6)
> UNION
> SELECT t0.NAME from t0 OBJECT, t1 ATTRIBUTE
> where (t0.ID = t1.OID) and (t1.TYPE = 4) and (t1.VALUE = 3);

I meant INTERSECT above, rather than UNION.

--Tim Received on Wed May 30 2001 - 17:56:54 CDT

Original text of this message

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