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-02112 SELECT ... INTO returns too many rows --- how to use the SELECT_ERROR option??

Re: SQL-02112 SELECT ... INTO returns too many rows --- how to use the SELECT_ERROR option??

From: David Fitzjarrell <oratune_at_aol.com>
Date: Wed, 10 Jan 2001 22:54:18 GMT
Message-ID: <93ip6l$mo2$1@nnrp1.deja.com>

In our last gripping episode "Dave Sutton" <dpsutton_at_marchsystems.co.uk> wrote:
> Thanks for the info guys....I take it there is no way to set
 precompiler
> options inline within a PL\SQL block.
>
> Dave
>
> <sigdock_at_my-deja.com> wrote in message
 news:93hbdr$cgd$1_at_nnrp1.deja.com...
> > A good solution but it might still cause a ora-01403, no data found,
> > error. This means you have to handle that exception.
> > Another way is to declare a cursor with an 'order by' clause and
 then
> > fetch this cursor. A bit more work but if you make this a standard
 way
> > of working you'll get used to it quite fast.
> >
> > regards,
> > BertJan Meinders
> >
> > In article <qglm5tge3nc0oipoinr44ctli3nitp3s8m_at_4ax.com>,
> > Todd Barry <toddbarry_at_earthlink.net> wrote:
> > > >I'm getting the following error when executing one of my stored
 procedures:
> > > >
> > > >SQL-02112 SELECT ... INTO returns too many rows
> > > >
> > > >I just require the first record that is returned by the select
 statement and
> > > >wish to discard the rest.
> > >
> > > Just add on the ROWNUM qualifier:
> > >
> > > select col1
> > > into var1
> > > from table1
> > > where col2 = something
> > > and rownum = 1;
> > >
> > > -Todd
> > >
> >
> >
> > Sent via Deja.com
> > http://www.deja.com/
>
>

Precompiler options apply only to the PRO* series of precompilers. YOu can set these options should you be coding in C/C++, FORTRAN, COBOL, ADA, etc. and utilize the appropriate PRO* precompiler. I am not certain which precompilers are still available or supported, but I do know that the PRO*C/C++ precompiler is alive and well.

-
David Fitzjarrell
Oracle Certified DBA

Sent via Deja.com
http://www.deja.com/ Received on Wed Jan 10 2001 - 16:54:18 CST

Original text of this message

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