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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Query Problem

Author  Topic 

mahesh_bote
Constraint Violating Yak Guru

298 Posts

Posted - 2006-05-03 : 01:00:46
Hi,
I have one table like

PlaceId PlaceName
1 A
2 B
1 C
1 D
3 E
4 F
4 G
3 H

I want output like

PlaceId PlaceName
1 A,C,D
2 B
3 E,H
4 F,G
...

please help on this.

thanks in advance

BMahesh

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-05-03 : 01:34:49
refer to here http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx


KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-03 : 02:12:23
You need to use Function to concatenate the Names. Read that article fully. Also note that concatenated Names will have maximum of 8000 characters

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -