Path: news.easynews.com!core-easynews!newsfeed1.easynews.com!easynews.com!easynews!news.alt.net!news.usenetgateway.com!not-for-mail
From: andrewst <member14183@dbforums.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Basic(?) SQL question -- set operations on >1 result set ???
Date: Fri, 06 Jun 2003 11:55:03 +0000
Organization: dBforums
Lines: 19
Sender: andrewst
Message-ID: <2967125.1054900503@dbforums.com>
References: <bbogj2$qlh$1@terabinaries.xmission.com>
User-Agent: dBforums
X-Original-NNTP-Posting-Host: dbforums.com
X-Original-Trace: 6 Jun 2003 08:29:37 -0400, dbforums.com
X-Authenticated-User: paul
Xref: core-easynews comp.databases.oracle.misc:98441
X-Received-Date: Fri, 06 Jun 2003 05:28:56 MST (news.easynews.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
