|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:47 AM
Points: 53,
Visits: 296
|
|
In my table i have following result sets
sno 101 102 103 105 106 107
i want following structures
101,102,103,105,106,107
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: 2 days ago @ 9:30 AM
Points: 595,
Visits: 2,143
|
|
Hi
Difficult without a little more information however this may point you in the right direction
declare @table as table (id int) INSERT INTO @table
SELECT 100 UNION ALL SELECT 101 UNION ALL SELECT 102 UNION ALL SELECT 103 UNION ALL SELECT 104 SELECT STUFF((SELECT ',' + CAST(id AS VARCHAR (3)) FROM @table t1 ORDER BY t1.id FOR XML PATH('')),1,1,'')
Andy
========================================================================================================================== A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
|
|
|
|