Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Passing variable from SQL to PL/SQL
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>'
Tha procedure in the package is defined to take a list of inout variables.
The PL/SQL procedure that I call from within the SQL script does DML
(insert/delete/update)
on a table. Above script does not work. Fails with the following error...
*ERROR at line 1:
Looks like the substitution is not taking place...but if I change the
procedure to a function in the
package definition and try it as follows,
/-- 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>'
This also fails because I can not do any DML from within a SELECT.
Any ideas/suggestions?
Thanks in advance.
Sceenu.
Received on Wed Jan 15 2003 - 01:38:49 CST