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 - using 'distinct'

Re: SQL - using 'distinct'

From: Rolf Hauck <Rolf.Hauck_at_datenrevision.de>
Date: Thu, 03 Sep 1998 11:41:14 +0200
Message-ID: <35EE643A.1AAB82A6@datenrevision.de>


Hi, Russel,
what about
select max(customer_id), name, address from customer group by name, address

Rolf

Russell Fray wrote:
>
> I have a table named 'customer'.
> I want to produce a mailing list from this table, and weed out
> duplicates. I was trying to use :
>
> select distinct name, address, customer_id from customer;
>
> In theory this should work, but many people have more than one
> customer_id (as they have more than one account). I want to distinct
> on everything APART from customer_id, so if addressing information is
> duplication only one instance is listed.
Received on Thu Sep 03 1998 - 04:41:14 CDT

Original text of this message

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