Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Basic(?) SQL question -- set operations on >1 result set ???
Originally posted by Rithban
> ...
> SELECT DISTINCT a FROM A
> INNER JOIN B ON A.b=B.b
> WHERE (B.value=123 B.c=1) AND
> (B.value=456 B.c=2) AND
> (B.value=789 B.c=3);
>
> But it returns nothing -- it finally dawned on me that the WHERE
> clause was
> restricting the results to rows in B that met all three criteria,
> which of
> course is impossible.
>
Try changing "AND" to "OR".
-- Posted via http://dbforums.comReceived on Fri Jun 06 2003 - 06:55:03 CDT