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)
 Distinct Row with Multiple Records

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-17 : 10:02:49
Intekhab writes "Table Name tblOrderEntry
Structure

Name Client ID
a1 1
a2 1
a3 1
a4 1
a2 2
a4 2
a1 2
a3 2
a2 3
a4 3
a3 3
a4 4


from the above struction I want the data like

Name Client ID
a1 1,2
a2 1,2,3
a3 1,2,3
a4 1,2,3,4

Please suggest me the easiest way to get this information.

Regards,


Intekhab Aalam"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-01-17 : 10:05:09
the easy way is to create a function that contencates the values using colaesce into a string.
http://www.sqlteam.com/item.asp?ItemID=2368
put the last part of the code into a function and call that.

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -