Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Passing Unix Vars to a Stored Procedure
Martin,
Inside your proc.sql script, refer to the command line parameters as &1, &2 etc. and call your procedure like this: execute martinproc ('&1', '&2', '&3');
SQL*Plus will do a straight character substitution before executing the command. I've assumed that all your parameters have a character data type. For other data types, your PL/SQL procedure should validate and cast to the appropriate type (e.g. to_number, to_date).
Regards
Martin
rmartin wrote:
>I need to pass Unix variables to a PL/SQL Stored Proc.
>
>I call the procedure like so (I've ommited the sql logon info etc):
>
>@proc.sql $1 $2 $3
>
>But how do I access these in my Stored Proc?
>
>What is the notation for assigning a Unix var to a Stored Proc IN Var?
>
>Thanks in advance.
>
>
>
>
Received on Fri Jan 03 2003 - 12:25:18 CST