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)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.