Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concat Multiple Data values in Junction table with many2many relations

Status
Not open for further replies.

daughtd

Programmer
Sep 6, 2006
15
US
I have a junction table that holds an employeeID and DepartmentID. Sort of like:

EmpID DeptID
1 200
1 300
1 110
2 300
2 200

I would like to write an SQL statement that would return the following dataset with one record for each Employee ID for display purposes:

EmpID Departments
1 200,300,110
2 300, 200

Can this be done without the use of a Sproc? If so how?
 
Take a look at this thread: thread183-1159740

If you have any followup questions, please feel free to post them here.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top