Home » SQL & PL/SQL » SQL & PL/SQL » problem with escape character
problem with escape character [message #240094] Thu, 24 May 2007 02:15 Go to next message
gautamvv
Messages: 254
Registered: June 2005
Senior Member

SQL> create table exx1(x number,y varchar2(20));

Table created.

SQL> SQL> insert into exx1 values(1,'abc');

1 row created.



now i want to update the value abc with abc@uuu&ii

so i am trying to use escape character


update exx1 set y='yyy\&ww' escape '\'

it is saying


SQL> update exx1 set y='yyy\&ww' escape '\'
  2  ;
Enter value for ww: 


how to invalidate the & here?

Re: problem with escape character [message #240099 is a reply to message #240094] Thu, 24 May 2007 02:29 Go to previous messageGo to next message
jungle
Messages: 6
Registered: May 2007
Junior Member

SQL> show escape
escape OFF
SQL> set escape on
SQL> update exx1 set y='abc@uuu\&ii';

Aggiornate 2 righe.

SQL>
Re: problem with escape character [message #240101 is a reply to message #240094] Thu, 24 May 2007 02:33 Go to previous messageGo to next message
gautamvv
Messages: 254
Registered: June 2005
Senior Member
oh that means by default '\' is an escape character?

i was under the impression that we can use any character
for this purpose, and then specify escape ' '

so there is no need to even specify "escape"


simply using \ in front of & will do the trick

Re: problem with escape character [message #240111 is a reply to message #240101] Thu, 24 May 2007 02:54 Go to previous message
jungle
Messages: 6
Registered: May 2007
Junior Member

SQL> set escape "|"
SQL> show escape
escape "|" (hex 7c)
SQL> update exx1 set y='abc@uuu|&ii';

Aggiornate 2 righe.

SQL>
Previous Topic: Create Table T1 with column name "select".
Next Topic: Please hepl me on this QUERY
Goto Forum:
  


Current Time: Thu Dec 08 06:02:20 CST 2016

Total time taken to generate the page: 0.08745 seconds