Reply to Re: Single quote in NVARCHAR string?

Your name:

Reply:


Posted by Hari Prasad on 09/20/05 15:04

Use the below code with "set quoted_identifier off"


set quoted_identifier off
declare @strsql nvarchar(500)
SELECT @strsql = "SELECT * FROM tblTest WHERE Field1 Like 'blah%'"

Thanks
Hari
SQL Server MVP

"Steve" <steve@hello.com> wrote in message news:432ff8b5_3@x-privat.org...
> How do I get a single quote (') in a NVARCHAR string in MS SQL Server?
>
> e.g. SELECT @strsql = "SELECT * FROM tblTest WHERE Field1 Like 'blah''
>
> Obviously this is invalid as the single quote before "blah" would end the
> varchar string.
>
> How do I get round this?
>

[Back to original 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

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