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!

strip quotes from text or varchar fields 1

Status
Not open for further replies.

CassidyHunt

IS-IT--Management
Jan 7, 2004
688
US
I am wondering if there is a simple way to go through a table and remove " or ' from a record if the it contains one of those items?

I am pulling this data into a webpage to populate a javascript array and have about 1200 records that some contain quotes that really mess up the array.

Thanks
Cassidy
 
Sure:
[tt]
UPDATE tblname
SET
fld1=REPLACE(REPLACE(fld1,"'",""),'"',''),
fld2=REPLACE(REPLACE(fld2,"'",""),'"','')
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top