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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to get unique combination from associative table...how?

Status
Not open for further replies.

sadcaper

Programmer
Dec 11, 2001
4
US
I have an associative table between Teams and Issues. Many issues can have many teams, therefore the need for a linking table.

What I'm having trouble with getting a unique combination of Teams out of that table.

For instance, the table has the following values:

ISSUEID TEAM
1 ADT
1 ED
2 ADT
2 OPT
2 ORD

I want to get the unique combination of teams for each issue. So...I want to get:

IssueID Teams
1 ADT, ED
2 ADT, OPT, ORD

Is there a way to get this from a query? All I can get are all the combinations, which does me no good. It needs to be unique.

I was using this query, but it doesn't do the job:

SELECT it.IssueID, it.teamid+', '+it2.teamid AS Teams
FROM tblissueteamlink AS it, tblissueteamlink AS it2
WHERE ( ((it.TeamID)<>it2.teamid));

Any help would be appreciated.
Thanks!
Drew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top