I want to return the results of select Column from Table into a comma separated string using SQL Server.
The column in question is rather large (nvarchar(2000)) so the solution has to be able to handle very large result values.
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.
If
Columncan be null, then either exclude it first, or useISNULL/COALESCE– otherwise a singleNULLwill break the entire sequence. It is more efficient to exclude it with aWHERE: