Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding two records into one record septrated by ','

 
pax smith
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a requirement that I have following data in my table

ID LocationID StateID
1 101 1001
2 102 1001
3 103 1001
4 104 1002
5 105 1002


I want to sql query which can return following result

Locations -- StateID
101,102,103 -- 1001
104,105 -- 1002

 
Agador Paloi
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you have so far?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic