Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Return Column as List of Comma Seperated Values Expand / Collapse
Author
Message
Posted Saturday, October 13, 2007 6:44 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, October 02, 2011 1:49 PM
Points: 89, Visits: 33
Comments posted to this topic are about the item Return Column as List of Comma Seperated Values


Post #410469
Posted Wednesday, December 30, 2009 6:48 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, October 05, 2012 3:23 AM
Points: 79, Visits: 232
A simple script to get comma seperated result.
declare @empids varchar(max);
set @empids = '';
select @empids = convert(varchar, empid) + ', ' + @empids
FROM employee

select @empids

--output
--, 1 , 2, 3 , 4

Post #840280
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse