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 -> Assigning Bind Variables to Substitution Variables in PL/SQL

Assigning Bind Variables to Substitution Variables in PL/SQL

From: <suvinay_at_gmail.com>
Date: 4 Nov 2005 15:14:41 -0800
Message-ID: <1131146081.508023.292290@g47g2000cwa.googlegroups.com>


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



1396901698

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

Original text of this message

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