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: Select Into doesn't work properly

Re: Select Into doesn't work properly

From: Dirk his Linux bakje <d.joosen_at_planetinternet.nl>
Date: Thu, 13 Jan 2000 08:47:35 +0100
Message-ID: <387D8317.16BFCBF6@planetinternet.nl>


Daniel wrote:

> Use a cursor. You will then be able to trap for both the condition where
> multiple rows are returned and when the query returns no rows.
>
> Daniel
> Austin, TX
>
> "Dirk his Linux bakje" <d.joosen_at_planetinternet.nl> wrote in message
> news:387C3429.C099DE6A_at_planetinternet.nl...
> > Hi
> >
> > I have a problem with a stored procedure where I declared an Select Into
> > statement like:
> > l_num NUMBER;
> > SELECT ID_1 INTO l_num FROM TABLE WHERE ID_2 = INPUT_PARAMETER;
> > This occurs in a ORA-01422: exact fetch returns more than requested
> > number of rows.
> >
> > When I type in PL/SQL the statement:
> > SELECT ID_1 FROM TABLE WHERE ID_2 = INPUT_PARAMETER;
> > Then the PL/SQL says: no rows selected
> > You see PL/SQL has no problems.
> >
> > What do I wrong,?
> > Thanks and with best regards
> > Dirk Joosen
> >
> >

This is not the problem maybe I wasn't clear enough why give the sp more then one row and in PL/SQL it found nothing Received on Thu Jan 13 2000 - 01:47:35 CST

Original text of this message

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