Special characters in SQLPlus 
Author Message
 Special characters in SQLPlus
I'm using SQLPlus to submit values to a LONG that contain symbols

special characters.

Is there an escape sequence I can use (like \ or ') to get them
accepting in my string?

Thanks,

Chris

--
Chris Forlano
Automation Development
Nortel Networks, Maidenhead
590 4342 (01628 434 342)



Wed, 18 Jun 1902 08:00:00 GMT
 Special characters in SQLPlus

Try putting
        set scan off
at the top of the sql script.

: I'm using SQLPlus to submit values to a LONG that contain symbols

: special characters.

: Is there an escape sequence I can use (like \ or ') to get them
: accepting in my string?

: Thanks,

: Chris

: --
: Chris Forlano
: Automation Development
: Nortel Networks, Maidenhead
: 590 4342 (01628 434 342)

--
While Alcatel may claim ownership of all my ideas (on or off the job),
Alcatel does not claim any responsibility for them. Warranty expired when u
opened this article and I will not be responsible for its contents or use.



Wed, 18 Jun 1902 08:00:00 GMT
 Special characters in SQLPlus
Quote:
> I'm using SQLPlus to submit values to a LONG that contain
symbols

them as
> special characters.

> Is there an escape sequence I can use (like \ or ') to get
them
> accepting in my string?

> Thanks,

> Chris

> --
> Chris Forlano
> Automation Development
> Nortel Networks, Maidenhead
> 590 4342 (01628 434 342)


Chris,

That is, the following statements work fine:


SQL> insert into test values ('bla%lala');
1 row created.
SQL> select * from test where name like 'bla\%lala';
no rows selected
SQL> select * from test where name like 'bla\%lala' escape '\';
NAME
----------------------------------------
bla%lala
Here, the escape proved necessary.
Using the '&' is a little different, howerver.
Here sqlplus will require input from the user,
and so the work aroud is to turn input off for
the time you need it.
SQL> insert into test values ('yadda&yadda');
Enter value for yadda: hun
old   1: insert into test values ('yadda&yadda')
new   1: insert into test values ('yaddahun')
1 row created.
SQL> set scan off
SQL> insert into test values ('yadda&yadda');
1 row created.
SQL> select * from test where name like 'yadda&yadda';
NAME
----------------------------------------
yadda&yadda
SQL> set scan on
It's the 'set scan [on|off]' that you will need to
invoke.
Hope this helps,
Sasha Romanosky

--
  This answer is courtesy of QuestionExchange.com
  http://www.questionexchange.com/showUsenetGuest.jhtml?ans_id=6106&cus...



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. special characters in SqlPlus under Linux

2. special characters in sqlplus

3. SQL find trouble with special characters

4. SQL Server and C++ Special Characters

5. BCP and special characters

6. Updating special characters in a database

7. Special Characters in Strings

8. Ignoring/escaping special characters in SQL

9. OpenRowset and special characters: DOT

10. detecting special characters

11. Special characters get mixed up when using DTS

12. Problem with special characters from form to db


 
Powered by phpBB® Forum Software