Home » RDBMS Server » Server Administration » single-ampersand (&) ...special character
single-ampersand (&) ...special character [message #371718] Wed, 29 November 2000 10:38 Go to next message
lee_mcindy@hotmail.com
Messages: 1
Registered: November 2000
Junior Member
Hi,

Does anyone know how should I treat this special character such as "&". For
Instance:
Update department
set dept_nm = 'Marketing & Resource Management'
where dept_num = '123';

However, in SQL*PLUS, the single-ampersand (&) is a substitution variables
to temporarily store values. Could someone please help me out...what should I do in
this case if I want to keep the "&" as part of my data input? I have tried
using a backslash ('Marketing &\ Resource Management'), and it works,
HOWEVER, it took in the blackslash too...I just want my data to look like
this 'Marketing & Resource Management' as the result. I appreciate the help very much!

Thank you very much!

-- Cindy Lee
Re: single-ampersand (&) ...special character [message #371720 is a reply to message #371718] Wed, 29 November 2000 11:24 Go to previous messageGo to next message
Babu Paul
Messages: 38
Registered: November 2000
Member
Hi,

Basically you have to setup the SQL environment variables, set the escape on and try executing the following SQL statement.

ie. SET ESCAPE ON

Update department
set dept_nm = 'Marketing \& Resource Management'
where dept_num = '123';

It should work hopefully

Good Luck!
Babu
Re: single-ampersand (&) ...special character [message #371745 is a reply to message #371720] Fri, 01 December 2000 08:32 Go to previous message
Cindy
Messages: 88
Registered: November 1999
Member
Paul,

Thank you very much for the help! :-)

-- Cindy
Previous Topic: row order from select statement
Next Topic: ORA-02064: distributed operation not supported
Goto Forum:
  


Current Time: Fri May 03 01:00:16 CDT 2024