Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 REMOVE SINGLE apostrophe

Author  Topic 

hizakemi
Starting Member

33 Posts

Posted - 2006-10-09 : 13:04:52
I’m using sql statement and I need to remove a single apostrophe in my records- For example VERIFIEDCUSTOMER'SADDRESS-- how should I remove apostrophe after CUSTOMER

Fyi. The name of the column is OVR_RSN and table name is Override

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-10-09 : 13:12:15
If you're reading that column in a select and you just don't want the apostrophe returned then replace it with a blank

SELECT replace(OVR_RSN, '''', '')


Note that you use two apostrophes in the place of the one in order to be able to include it in the T-SQL code.
Go to Top of Page

hizakemi
Starting Member

33 Posts

Posted - 2006-10-09 : 13:19:27
quote:
Originally posted by hizakemi

I’m using sql statement and I need to remove a single apostrophe in my records- For example VERIFIEDCUSTOMER'SADDRESS-- how should I remove apostrophe after CUSTOMER

Fyi. The name of the column is OVR_RSN and table name is Override




Thank you very much- It work
Go to Top of Page
   

- Advertisement -