Totti
Valued Member
Points: 58
More actions
February 23, 2007 at 8:28 am
#369615
hi all
my select statement is something like this
select name
from table
result is
O'Shea
O'Connor
..I would like to know how i can replace the single quotes with empty space in SQL
so the results will display
O Shea
O Connor?
any ideas?
Ken McKelvey
SSCoach
Points: 18843
February 23, 2007 at 9:07 am
#691442
DECLARE @Name varchar(20)
SET @Name = 'O''Shea'
SELECT @Name
SET @Name = REPLACE(@Name, '''', ' ')
-- may want to replace with 146
SET @Name = REPLACE(@Name, '''', CHAR(146))
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply