Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> syntax of stored procedure arguments in 8i
I'm trying to write a simple stored procedure in oracle 8i, but am
having trouble passing a string as an argument; here's the procedure:
CREATE PROCEDURE get_hour_value (date_stg IN CHAR:=11, ret_val OUT
NUMBER) AS
BEGIN
SELECT value
INTO ret_val
FROM R_HOUR
WHERE DATE_HOUR = TO_DATE(date_stg,'DD-MON-YYYY');
END;
This compiles and gets stored.
Here's the execution in SQL*Plus:
exec get_hour_value(date_str=>"28-SEP-1999",ret_val=>myval);
(myval is defined variable in my sqlplus session). This causes an error
with the message:
PLS-00201: identifier '28-SEP-1999' must be declared
so I'm doing something stupid with passing and/or defining the string argument; can anybody tell me the correct way to write this?
Appreciate it...hugh casey
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Nov 11 1999 - 18:09:32 CST