Home » SQL & PL/SQL » SQL & PL/SQL » Escape character for '&'
Escape character for '&' [message #19278] Thu, 07 March 2002 23:27 Go to next message
Raj
Messages: 411
Registered: November 1998
Senior Member
Hi Have to add '&' in a String and store it in data base if I give '&Name' it asks for input, so any one cud tell me is there any escape character available for that.

Thanks.
Re: Escape character for '&' [message #19280 is a reply to message #19278] Thu, 07 March 2002 23:50 Go to previous messageGo to next message
syam
Messages: 5
Registered: August 2001
Junior Member
In SQL*PLUS set the escape character on,

SQL> set escape on (default is )

or

SQL> set escape ?( or what ever u wanna set as escape charecter)
Re: Escape character for '&' [message #19284 is a reply to message #19278] Fri, 08 March 2002 04:20 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
try this:

sql> set define off
Re: Escape character for '&' [message #19295 is a reply to message #19278] Sat, 09 March 2002 16:18 Go to previous message
Sudhakar Atmakuru
Messages: 58
Registered: May 2001
Member
Turn the ESCAPE on by SET and precede the ampersent with a backslat '' in your SQL statement. That is it. It should work. For example, it would look like

SET ESCAPE ON
SELECT '&NAME' FROM DUAL;

It outputs a column with &NAME value.

Good luck.
Previous Topic: checking 18yrs old in forms
Next Topic: SQL query
Goto Forum:
  


Current Time: Sat Apr 20 04:27:25 CDT 2024