Muhammad Abbas - Data Engineering Architect
Pages
CV
Profile
BLOG
Search This Blog
Showing posts with label
column into row
.
Show all posts
Showing posts with label
column into row
.
Show all posts
Wednesday, August 18, 2010
[T-SQL] To concatenate the values of a column in all rows into one row.
USE pubs
GO
DECLARE @title_ids varchar(150), @delimiter char
SET @delimiter = ','
SELECT @title_ids = COALESCE(@title_ids + @delimiter, '') + title_id FROM titles
SELECT @title_ids AS [List of Title IDs]
Older Posts
Home
Subscribe to:
Posts (Atom)