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 question - distinct

Re: sql question - distinct

From: Galen Boyer <galen_boyer_at_yahoo.com>
Date: 27 Nov 2006 18:59:02 -0600
Message-ID: <ud578yzx4.fsf@rcn.com>


On 27 Nov 2006, soalvajavab1_at_yahoo.com wrote:
> How can I apply DISTINCT only to the first column in this query:
>
> SELECT DISTINCT UNIT_ID, BFP_NUMBER, METER_NUMBER
> FROM table_1
>
> It applies it to all 3 fields now. Pls advise.

If you table looks like this:

UNIT_ID BFP_NUMBER METER_NUMBER

1        10          100
1        11          101
2        12          102

What should the output be?

-- 
Galen Boyer
Received on Mon Nov 27 2006 - 18:59:02 CST

Original text of this message

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