Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Assigning Bind Variables to Substitution Variables in PL/SQL
Hello all,
I seem to be hitting an issue trying to assign a bind variable to
substitution variable in PL/SQL block - no problem in plain old
SQL*Plus. Here it is:
SQL> column mydbid new_value dbid
SQL> declare
2 x number;
3 begin
4 execute immediate 'select dbid mydbid from v$database' into x;
5 end;
6 /
PL/SQL procedure successfully completed.
SQL> define dbid
SP2-0135: symbol dbid is UNDEFINED
MYDBID
SQL> define dbid
DEFINE DBID = 1396901698 (NUMBER)
Any help in how to achieve this in PL/SQL is much appreicated!
thanks
-- suvinay
Received on Fri Nov 04 2005 - 17:14:41 CST