October 13, 2008 at 2:35 pm
Hi, I have two fields State and City in one table. When I select I get
STATE CITY
Connecticut Hartford
Connecticut Stamford
Connecticut New Haven
Connecticut Bridgeport
But I need in CSV format, like
ConnecticutHartford, Stamford, New Haven, Bridgeport
There are many cities for some states. At my work place we can’t use dynamic sql. So can anybody suggest me the best way to do it?
October 14, 2008 at 2:28 am
please refer to this link. It might be helpful:
http://www.sqlservercentral.com/articles/Test+Data/61572/
Also refer
October 14, 2008 at 7:18 am
Hi, I tried the first one but its not working. Its giving me null values. The other one I already tried but didn’t work as my database is in 2000, so I can’t use XML path.
October 14, 2008 at 7:23 am
Also refer
Failing to plan is Planning to fail
October 14, 2008 at 8:09 am
Thank you Madhivanan, it worked.
October 15, 2008 at 4:03 am
You are welcome 🙂
Failing to plan is Planning to fail
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply