Skip to Main Content

SQL Developer

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 to deal with escaping characters?

david.karrSep 10 2007 — edited Jan 8 2009
Using SQLDeveloper v1.2.0 with Oracle 9i.

I'm converting a sql script that used to use Jakarta Jelly syntax (xml). I'm replacing it with a pure SQL syntax so I can execute it directly in both SQLDeveloper and SQLPlus. The text in the row data has a bunch of occurrences of special characters that I need to escape somehow, to avoid prompting and other issues.

I tried replacing strings like "a & b" with "a \& b". My script begins like the following:

-------------------------
set pagesize 0
set echo off
set verify off
set feed off
set prompt off
set head off
set line 200
set esc on \

truncate table <tablename>;
-------------------------

However, when I run the script, it still prompts me when it finds a string like "... \& ...".

What can I do to get this to work in SQLDeveloper, and to work in SQLPlus at the same time?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2009
Added on Sep 10 2007
10 comments
10,420 views