You are here: Re: Double quotes replacement « MsSQL Server « IT news, forums, messages
Re: Double quotes replacement

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация