Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can i have '&' in EXECUTE IMMEDIATE statement?

Oracle_WalkerDec 28 2011 — edited Jan 3 2012
I have PL/SQL procedure, where i will be inserting data to a table. Data which i am inserting is having a '&' value in it. If i use the below statement for insert then sqlplus is prompting for the value '&' like a substitution value while compile this procedure.
EXECUTE IMMEDIATE 'INSERT INTO TABLE_TEST VALUES (:1,:2)' USING 'root/direct/&text', SYSDATE;
If i replace the '&' by assigning this value to VARCHAR field then it is working properly. But when i populate an xml from this table using DBMS.XMLGEN, then the value '&' is not entity escaped in the XML which is normally replaced with '&' in XML.

Please help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 31 2012
Added on Dec 28 2011
13 comments
1,504 views