Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Escaping quote character
Message
 
 
To
06/10/2014 11:20:10
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01608856
Message ID:
01608860
Views:
31
This message has been marked as a message which has helped to the initial question of the thread.
>>
>>SET @SQL='...WHERE Client.City=''Michel''''s city'''
>
>Thanks, but is this syntax also supported for such situation:
>
>
>SET @SQL='...THEN Client.City ELSE '''''''' END'',''L...'
>
>
>...where the ELSE is supposed to have a result of ''.
>
>It seems the first example works. But, the script cannot be executed as it fails later on in such situation.

You need to use 4 single quotes if you want to use a string.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform