TSQL: Concatenate Multiple Rows into String
use Northwind declare @CategoryList varchar(1000) select ‘Results = ‘ + @CategoryList
select @CategoryList = coalesce(@CategoryList + ‘, ‘, ”) + CategoryName from Categories
Posted in Labels: SQL SERVER | at 8:35 AM
use Northwind declare @CategoryList varchar(1000) select ‘Results = ‘ + @CategoryList
select @CategoryList = coalesce(@CategoryList + ‘, ‘, ”) + CategoryName from Categories
Copyright 2009
Happy Programming
Free WordPress Themes
designed by
EZwpthemes
Converted into Blogger Templates by Theme Craft | Falcon Hive
0 Response to "TSQL: Concatenate Multiple Rows into String"
Post a Comment