Re: Distinct rows

From: Todd and Mary Ryder <tryder2_at_home.com>
Date: 1999/11/07
Message-ID: <Ym6V3.20331$Ec1.213014_at_news1.frmt1.sfba.home.com>#1/1


As long as you have no preference as to which PRODUCT you when two or more exist for a given vendor, this will work:

select a.vendorid, a.product, a.description from vendors a, vendors b
where a.vendorid = b.vendorid
and b.rownum = 1

Chris Jordan <mail_at_mailer.com> wrote in message news:9k_P3.4693$Qo3.96613_at_wbnws01.ne.mediaone.net...
> Hi I have a query (select vendorid, product, description from vendors
 where
> vendorid < 100) that is returning duplicate information, ie.
> VENDORID PRODUCT DESCRIPTION
> 1 Switches RKS
> 1 Switches DDK
> 2 UPS New
>
> What query can I use that displays only one instance of a specifc vendor,
> i.e in the above, only vendorids 1 & 2 are
> displayed for a total of two records(1,switches,RKS) and (2,UPS,New).
>
> Thanks,
> Chris
>
>
>
Received on Sun Nov 07 1999 - 00:00:00 CET

Original text of this message