October 8, 2009 at 2:00 pm
I have the following data in my table
number name city value
1 aaa bbb ccc;ddd;lll;mmmm;
2 xxxyyyzzz;lll;nn;
3 mmmnnn666;
I wanted to split the above data like the following.
number name city value
1 aaabbbccc
1 aaabbbddd
1 aaabbblll
1 aaabbbmmm
2xxxyyyzzz
2xxxyyylll
2xxxyyynn
3mmmnnn666
How can I do this?
Thanks in advance.
October 8, 2009 at 2:09 pm
You might want to search for "split string function" on this site.
October 8, 2009 at 2:22 pm
Please read the following article on "Tally" tables... it explains how to do it for a whole table like that and it also explains why it works.
http://www.sqlservercentral.com/articles/T-SQL/62867/
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply