0

hi every one

my problem is is to convert id column values as comma separated

ex: id
1
2
3
4
5
6
i want result set as string "1,2,3,4,5,6,7....."

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by tatarao25
0

Look up group_concat: select group_concat(id) from <yourtablenamehere> group by ''

it is not working for primary key column

0

Yes it is. Have a close look at my example, especially the group clause.
If it does not work for you, show your table definition and the code.

0

i got the result by following statement :

select group_Concat(convert(id,char)) as idKey from users

thanks for spending time

Edited by tatarao25: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.