Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help constructing a query (UNION or subselect)
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