Thread: query problem
View Single Post
  #1 (permalink)  
Old May 23rd, 2007, 08:29 AM
beetle_jaipur beetle_jaipur is offline
Authorized User
 
Join Date: Feb 2006
Location: jaipur, rajasthan, India.
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via Yahoo to beetle_jaipur
Default query problem

Hi everyone,

i am having a problem with this query, plz anyone help me regarding this problem, i will be very thankful


Suppose we hav a table with two fields

- id and state

id is not unique means one to many relation in id and state


for e.g

1 Delhi
1 Haryana
1 Punjab
2 Maharashtra
2 Goa

....

now we want our result in following form

1 delhi,Haryana,Punjab
2 Maharashtra,Goa

how we can achhieve it in single query without using cursor???

thanks for reading and your consideration
all suggestions are welcome,

thanks & regards

ashok sharma


Reply With Quote