Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL: How to see items from more than one vendor
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
![]() |
![]() |