I need to wrap the result of a sql statement in single quotes so that is can be passed as a string later in the sproc....
Each value in the comma separated list - so this result below will reveal 1345 ,5427 ,3166 ,8367 ,7370
FOR XML PATH('')),1,1,''))) as [Hundred]
asked May 11, 2011 at 10:15 AM in Default
If you just need a quote on either end then try this:
or use the [quotename] specifying a single quote as the character to use: