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: too many values?

Re: too many values?

From: Martin Doherty <martin.doherty_at_elcaro.moc>
Date: Wed, 20 Nov 2002 09:42:31 -0800
Message-ID: <nUPC9.10$wB.150@news.oracle.com>


Yet another option is to OPEN & do a single FETCH from a cursor.

Daniel Morgan wrote:

>tony wrote:
>
>
>
>>Hi. I'd like to do a "select into" in pl/sql but I am getting a too
>>many values error. How can I select only the first value that
>>satisfies the query?
>>
>>thanks
>>
>>
>
>Many possibilities. One tony mentions which is WHERE ROWNUM = 1.
>
>Another is SELECT MAX(value) FROM ...
>
>Another is SELECT MIN(value) FROM ...
>
>Depending on the situation you might use SELECT DISTINCT value FROM
>
>Daniel Morgan
>
>
>
>
Received on Wed Nov 20 2002 - 11:42:31 CST

Original text of this message

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