SQL ' --> ' replacement -


i have dynamic table need execute query

declare @sql nvarchar(max)  set @sql = 'select x, y extable z 'example' '     exec (@sql) 

i have problem becouse 'example' can't added @sql variable.

i try add &apos ;example&apos ; not work.

any suggestion how can change &apos ; --> '

you can quote quotes in sql quote:

set @sql = 'select x, y extable z ''example'' '  

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -