Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

sql server results to comma delimited string

DECLARE @csv VARCHAR(MAX)
SELECT @csv = COALESCE(@csv + ',' ,'') + book_title from Test.dbo.Books where book_id IN ( 101, 102, 103);
SELECT @csv 

Output
Head First SQL, SQL Puzzler, T-SQL Fundamentals
Source by javarevisited.blogspot.com #
 
PREVIOUS NEXT
Tagged: #sql #server #results #comma #delimited #string
ADD COMMENT
Topic
Name
8+3 =