In sybase ASA, there is an aggregate function called
list, which can give the output as required by u. The select query will be like below
select id, list(Name) from test group by id
Below link on List() function is as below
http://searchoracle.techtarget.com/a...301455,00.html
List function produces a comma-separated list of all the non-null values in a column for each group in a GROUP BY query
But if u r a sybase ASE user then there is no such aggregate function in sybase 12.5.x as per my knowledge and we cant create functions in sybase ASE 12.5.x also. so the better way might be to use a stored procedure