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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Basic(?) SQL question -- set operations on >1 result set ???

Re: Basic(?) SQL question -- set operations on >1 result set ???

From: andrewst <member14183_at_dbforums.com>
Date: Fri, 06 Jun 2003 11:55:03 +0000
Message-ID: <2967125.1054900503@dbforums.com>

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.com
Received on Fri Jun 06 2003 - 06:55:03 CDT

Original text of this message

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