Re: how to create oracle stored procedure

From: Mike Dwyer <dwyermj_at_co,larimer.co.us>
Date: 2000/06/29
Message-ID: <kSL65.146$Pl2.62170_at_wdc-read-01.qwest.net>#1/1


Enter the command Show Error to see the error message, "an INTO clause is expected in this SELECT statement".
The problem is that emp_lname has nowhere to go after you select it. Try...

create OR REPLACE procedure ws_emp as
V_EMP_LNAME EMPLOYEE.EMP_LNAME%TYPE;
begin
select emp_lname
INTO V_EMP_LNAME
from employee;
end;
/

<wsunarko_at_my-deja.com> wrote in message news:8je85n$9kj$1_at_nnrp1.deja.com...
> Could someone please tell me how to create a stored proc in oracle.
> I created the following from sql plus:
>
> create procedure ws_emp as
> begin
> select emp_lname
> from employee;
> end;
> /
>
> It came back with:
> Procedure created with compilation errors.
>
> TIA
> Welly
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Jun 29 2000 - 00:00:00 CEST

Original text of this message