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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sql server problem

Author  Topic 

pkuchaliya
Starting Member

49 Posts

Posted - 2008-07-10 : 01:06:30
Hi any body can help me this problem,
i have output of query like this.

PANJOB000000000001 New Delhi
PANJOB000000000001 Mumbai
PANJOB000000000002 New Delhi
PANJOB000000000002 Mumbai

i have to combine the output like

PANJOB000000000001 New Delhi,Mumbai
PANJOB000000000002 New Delhi,Mumbai

Please help me
waiting for reply



pankaj

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-10 : 01:07:29
see
http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/rowset-string-concatenation-which-method-is-best.aspx
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-10 : 01:08:22
http://www.projectdmx.com/tsql/rowconcatenate.aspx
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-10 : 01:13:27
one more
http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=CreateACommaDelimitedList&referringTitle=Home


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

pkuchaliya
Starting Member

49 Posts

Posted - 2008-07-10 : 01:37:24

thanks khtan,
its working.
quote:
Originally posted by khtan

see
http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/rowset-string-concatenation-which-method-is-best.aspx
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254


KH
[spoiler]Time is always against us[/spoiler]





pankaj
Go to Top of Page
   

- Advertisement -