I am seeing a FOR clause get some odd formatting.
My code is:
SET @cmd = ( SELECT sg.Column0 + @crlf
FROM dbo.staging_generic sg
WHERE sg.RowNumber > 1
FOR XML PATH('')
, TYPE
).value('.', 'VARCHAR(MAX)')
I can't seem to make it look right on the forum. If you format it in SSMS you'll see what I mean.
The FOR clause should line up with the SELECT not the SET.
I don't think the ).value is being formatted at all.
My code is: I can't seem to make it look right on the forum. If you format it in SSMS you'll see what I mean.
The FOR clause should line up with the SELECT not the SET.
I don't think the ).value is being formatted at all.