Question : works for \ but not "

using text datatype

UPDATE table1
SET column1 = REPLACE(cast(column1 as varchar(20)), '\\\\', '')
WHERE CHARINDEX('\\\\', column1) > 0

works
for
\

but does not work for "

UPDATE table1
SET column1 = REPLACE(cast(column1 as varchar(20)), '""""', '')
WHERE CHARINDEX('""""', column1) > 0

(0 row(s) affected)


the text column is
'""""'""""'""""'""""'""""

so there should be rows affected

Answer : works for \ but not "

Try this
1:
2:
3:
UPDATE table1
SET column1 = REPLACE(cast(column1 as varchar(255)), '""""', '')
WHERE column1 LIKE '%"%'
Random Solutions  
 
programming4us programming4us