Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating varchar2 field in database that contains &

Status
Not open for further replies.

juanpablo

Programmer
Mar 27, 2003
1
MX
Hello,
I was trying to update a field in the database but the string of text that I'm trying to insert gets cut off after the ampersand i.e.

UPDATE remarks
set remark_ovrd='Beautiful House with pool overlooking the Las Vegas Strip, nice back yard, well kept & maintained'
where list_recno=123542

I tried escaping the ampersand with && but that just prompts me to enter a value for maintained...any help would be appreciated. Thanks in advance.
 
All you have to do is:
SQL> set escape on
SQL> UPDATE remarks
2> set remark_ovrd="Beautiful House with pool overlooking 3> the Las Vegas Strip, nice back yard,
4> well kept \& maintained"
5> where list_recno=123542

make sure you use the backslash (\) before ampersand (&)

Nakis.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top