Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> syntax of stored procedure arguments in 8i

syntax of stored procedure arguments in 8i

From: <hugh.casey_at_colorado.edu>
Date: Fri, 12 Nov 1999 00:09:32 GMT
Message-ID: <80flrp$li2$1@nnrp1.deja.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US