Formatting dynamic sql doesn't work with embedded single quotes
Unformatted: SELECT 'str' AS [Value] Expected: SELECT @sql=N'SELECT ''str'' AS [Value]' sqlinform: SELECT @sql=N'SELECT 'str' AS [Value]' It also doesn't work the other way Unformatted: SELECT @sql='SELECT ''str'' AS [Value]' Expected: SELECT 'str' AS [Value] sqlinform: SELECT str AS [Value]
|