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 -> Re: syntax of stored procedure arguments in 8i

Re: syntax of stored procedure arguments in 8i

From: Knut Lassmann <k.lassmann_at_q-bus.de>
Date: 12 Nov 1999 02:53:01 -0600
Message-ID: <382BD5B1.813324E7@q-bus.de>


hugh.casey_at_colorado.edu wrote:

> 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

First: You mistyped the parameter name date_stg in the procedure call.

Second: You have to use ' instead of " when passing a string.

Regards

Knut

--


|                                                                  |
|    Knut Lassmann                   Email: K.lassmann_at_q-bus.de    |
|    q~bus Mediatektur GmbH          Fon:   390 489 186            |
|    Salzufer 13F                    Fax:   390 489 140            |
|    10587 Berlin                                                  |
|                                                                  |
--------------------------------------------------------------------



Received on Fri Nov 12 1999 - 02:53:01 CST

Original text of this message

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