Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Wrong procedure code???
The result you get from the SELECT statment in PL/SQL must be put INTO some
variables.
Try this instead:
CREATE OR REPLACE PROCEDURE DB_BOOK_PROC (NAME VARCHAR2) AS
V_VAR1 DB_BOOK_at_ROWTYPE;
BEGIN
SELECT * INTO V_VAR1
FROM DB_BOOK WHERE AUTHOR=NAME;
END;
Hope this can help
Winnie
Jacques Sireude wrote in message <6o130p$b94$1_at_news.rain.org>...
>Hi,
> I would like to create the following procedure:
>
>create procedure DB_BOOK_PROC (name VARCHAR2) as begin select * from
DB_BOOK
>where AUTHOR = name; end;
>
>When I compile, the status is invalid...
>
>Does someone know what is wrong???
>
>Thanks for any help.
>
>Jacques.
>
>---------------------------------------------------------------------------
-
>----------------
>Jacques SIREUDE
>6585 PICASSO Rd Apt#3
>ISLA VISTA CA 93117
>USA
>tel/fax: 1-805-685-9208
>e-mail: sireude_at_eiffel.com
> jacques.sireude_at_enst-bretagne.fr
>http://www-eleves.enst-bretagne.fr/~sireude
>---------------------------------------------------------------------------
-
>----------------
>
>
>
Received on Wed Jul 08 1998 - 23:25:15 CDT
![]() |
![]() |