Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: HELP me
Oh..sorry..you can only select one column into a scalar variable like this...I 'cut and pasted' too fast..instead of 'SELECT *', select one column only, or define more variables to receive column values..
Time for coffee I guess :)
Steve
In article <91d5ep$pmo$1_at_nnrp1.deja.com>,
steveee_ca_at_my-deja.com wrote:
> In article <ebo_5.108576$hk4.3928283_at_news.infostrada.it>,
> "MP" <mauro-papagno_at_libero.it> wrote:
> > I'm crazy with this Store Procedure
> > when edit the statement RUN in SQL*PLUS he tell me:
> > :
> >
> > - Procedure created with compilation errors.
> >
> > What I wrong ?
> > I try the change AS with IS , but nothing.
> >
> > HELP HELP
> >
> > Thanks and Good Work.
> > Ciao e Buon Lavoro.
> >
> > Store Procedure:
> > CREATE OR REPLACE PROCEDURE sp_prova2 (PP IN Varchar2)
> > IS
> > BEGIN
> > SELECT * FROM NEW_BC_SERVICES_FACT WHERE BC_SERVICE_NAME = PP;
> > END sp_prova2;
> > /
> > Hi,
> You need to use a different syntax. I can't describe it all here, but
> you include the 'INTO' keyword before your FROM clause. You declare a
> variable, 'v_services' for example and SELECT...INTO the variable FROM
> your table..this only works if your query returns only one row.
> You'll have to grab a book to see the syntax..anyway, as an example,
> rewrite your code something like this:
>
>
>
>
>
>
>
Sent via Deja.com
http://www.deja.com/
Received on Fri Dec 15 2000 - 08:44:28 CST
![]() |
![]() |