Split field by Comma

Newbie Member
27Jan2009,16:34   #1
Gnaniyar's Avatar
Hi all,

i want to split field by comma. For example,

primarySkills

20553, 32115, 78546

i have this field as id. it may contain 4 or 5 or above that. i want to retrive these in different columns by splitting comma.

i want ouput like this: ( if 3 values = 3 column or 4 values = 4 column)

primarySkills primarySkills primarySkills

20553 32115 78546

Thanks in advance.

- Gnaniyar Zubair
Skilled contributor
25Mar2009,14:19   #2
Bhullarz's Avatar
Quote:
Originally Posted by Gnaniyar View Post
Hi all,

i want to split field by comma. For example,

primarySkills

20553, 32115, 78546

i have this field as id. it may contain 4 or 5 or above that. i want to retrive these in different columns by splitting comma.

i want ouput like this: ( if 3 values = 3 column or 4 values = 4 column)

primarySkills primarySkills primarySkills

20553 32115 78546

Thanks in advance.

- Gnaniyar Zubair
I think PHP's explode function can help you in this.