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: SQL: How to see items from more than one vendor

Re: SQL: How to see items from more than one vendor

From: <yitbsal_at_statcan.ca>
Date: Wed, 08 Dec 1999 15:51:41 GMT
Message-ID: <82luqb$ah3$1@nnrp1.deja.com>


In article <JhFPOJwcFBAWNq5D2utQfJIA4xJf_at_4ax.com>,   Dave Rawding <daverawding_at_mediaone.net> wrote:
> Given an item_vendor table with fields item, vendor, etc. how do I
> find situations where the same item is purchased from more than one
> vendor? This is not normally the case, but it does happen
> occassionally. tia.
>

There are various ways. The following is not necessarily the most efficient.

SELECT *
FROM ITEM_VENDOR A
WHERE ITEM IN
(SELECT ITEM
FROM ITEM_VENDOR B
WHERE A.VENDOR <> B.VENDOR);

Salaam Yitbarek

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Dec 08 1999 - 09:51:41 CST

Original text of this message

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