| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Passing variable from SQL to PL/SQL
Thanks for the suggestions, Thomas...but I did not use bind variables for
this.
I figured out that in my call to the PL/SQL program if I do not give all the
variables in a
single line, it is not accepting the input variables...in other words, after
prompting for and
accepting the user input, if try the call as follows:
execute <package>.<procedure>('&var1',
'&var2',
'&var3',
..........)
then I run into a problem I described in my earlier post...but if I try the
above as
execute <package>.<procedure>('&var1', '&var2', '&var3'...), it works fine.
I did not give the statements exactly as I ran them in my program, in my
earlier post. I did
not think that putting the variables in a seperate lines would make a
difference for the call.
But looks like it does.
Thank you very much for your time.
Sceenu.
"Thomas Kyte" <tkyte_at_oracle.com> wrote in message
news:b03r50028q8_at_drn.newsguy.com...
> In article <de8V9.2567$i73.655000_at_twister.neo.rr.com>, "srinivasarao
says...
> >
> >Hello gurus,
> >
> >I have a simple SQL script which does the following:
> >
> >/-- Begin --/
> >accept <var1> char prompt 'Value for <var1>'
> >accept <var2> char prompt 'Value for <var2>'
> >accept <var3> char prompt 'Value for <var3>'
> >accept <var4> char prompt 'Value for <var4>'
> >accept <var5> char prompt 'Value for <var5>'
> >...
> >...
> >execute <package>.<procedure>(&var1, &var2, &var3...);
> >/--End --/
> >
> >Tha procedure in the package is defined to take a list of inout
variables.
> >
>
>
>
>
> >
> >
>> ops$tkyte_at_ORA817DEV>
> ops$tkyte_at_ORA817DEV> set autoprint on
>
> >
> >
> > >> >(insert/delete/update)
> >The PL/SQL procedure that I call from within the SQL script does DML
>> Expert one on one Oracle, programming techniques and solutions for Oracle.
> --
> Thomas Kyte (tkyte@oracle.com) http://asktom.oracle.com/
![]() |
![]() |