I have a dynamic sql string in a existing procedure. What does the char(10) do?
Set @SelectStr = @SelectStr + ' And FC.FCode = ''' + @FCode + '''' + CHAR(10)
CHAR(10)
is the character represented by ASCII code 10, which is a Line Feed (\n) so its a new line.
(Although its not the windows standard new line which is Carriage Return + Line Feed CHAR(13)+CHAR(10)
)
In your example its probably just used to make the string more readable when its printed out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With