Dec 29, 2010

how to get rows into single field

declare @AccountCategory varchar(max)

set @AccountCategory=''
SELECT @AccountCategory=@AccountCategory+', '+ Prefix FROM(select Prefix
from a_AccPrefixIncludes) AS Prefix

print @AccountCategory