|
Posted by Dan Guzman on 09/05/05 06:44
You need to specify 2 single quotes within the literal string when 1 quote
is desired. Try:
Select Replace(colA,'"','''')
From tblXYZ
--
Hope this helps.
Dan Guzman
SQL Server MVP
"NickName" <dadada@rock.com> wrote in message
news:1125889758.581518.99700@g49g2000cwa.googlegroups.com...
> Hi,
>
> It seems to be simple, however, it stumbles me.
> how to replace all the double quotes (") within the following
> sentence (or a column) with single quotes ('),
>
> colA = this is a freaking "silly" thing to do
> into
> colA this is a freaking 'silly' thing to do
>
> Select Replace(colA,'"',''')
>>From tblXYZ
>
> won't work,
>
> Select Replace(colA,'"',"'")
>>From tblXYZ
>
> won't work neither.
>
> How come? Thanks.
>
Navigation:
[Reply to this message]
|