Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Programming Procedure
James, when I load this into SQL Plus and run it, it responds that it compiles
with errors (I removed the comments on the name change obviosly). Do you have an
example of a simple stored procedure that I should be able to compile.
Thanks, Stan.
James wrote:
> Stan, try
>
> CREATE PROCEDURE AVGBALANCE (i_state CHAR(22)) <===== name change
> RETURNS (AVG_AMOUNT FLOAT)
> AAS
> BEGIN
> SELECT AVG(BALANCE_DUE) FROM CUSTOMER
> WHERE STATE = i_state INTO AVG_AMOUNT; <===== name change
> SUSPEND;
> END;
>
> bind variables are not required in PL*SQL. I changed the name to avoid
> confusion (and interesting results) in the where clause.
>
> HTH
> James
>
Received on Mon Apr 05 1999 - 06:46:12 CDT