Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Distinct Rows?

Re: Distinct Rows?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 20 Mar 2000 16:56:18 +0100
Message-ID: <953568461.10425.1.pluto.d4ee154e@news.demon.nl>


Yes of course if you ask
select customerNumber
from customer
where status = 1
you get two rows, because there are two rows, distinct or not (and they are distinct)
Obviously you want to know
select min(customernumber)
from customer
where status = 1

Hth,
Sybrand Bakker, Oracle DBA

Kevin White <kevin_white_at_lagan.com> wrote in message news:953565654.688.0.nnrp-04.9e9859ae_at_news.demon.co.uk...
> Does anyone know how to;
>
> I have a table like so,
>
> customerNumber Status
> 10010 1
> 10011 1
> 10015 2
>
> I want to select the first customer number from the list with a Status of
1.
>
> If I try this in a stored procedure it wants to return both customer
number
> 10010 and 10011.
>
> Thanks Kevin...
>
>
Received on Mon Mar 20 2000 - 09:56:18 CST

Original text of this message

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