Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
oldfox
Starting Member
17 Posts |
Posted - 2010-08-13 : 14:26:45
|
| I have list with a country code in the first column and area codes in the second column separated by comma.I need to create list with unique country code + area code combination's.It has to be like thisCountry Area44 7844 7944 80Thank you.drop table #my_listcreate table #my_list(cc_prefix numeric,CityCountry varchar(200))insert into #my_list values (44,'78,79,80')select * from #my_list |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2010-08-13 : 14:36:24
|
| You can use a split function. Search this forum for split functions, there are lots of versions.EDIT : Try fnParseList from herehttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76033#315323 |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-14 : 00:34:21
|
| http://visakhm.blogspot.com/2010/02/parsing-delimited-string.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|