Hello all!
I have a problem that I'm not able to solve. I have the following
table set:
User:
------
UserId
FirstName
SurName
....
..
UserGroup:
------
UserId
GroupId
Group:
------
GroupId
Name
GroupTypeId
GroupType:
------
GroupTypeId
Name
In short. An user can belong to one or more groups, a group can
contain one or more users. A group is of a specified type, given by
GroupTypeId, like "Team", "Region" etc.
An alternative design is to keep groups of a specific type in it's own
table, but this isn't as flexible since then there must be a table
added everytime there is a new kind of groups.
What I want is the ability to ask a query producing a result like
this:
FirstName SurName Team Region
--------------------------------------------------------
Bill Smith X3 South
..........
.......
The problem is to get the "Team" and "Region" in the same row. I
haven't manage to do this even if I splited the "Team" and "Region" in
their own tables.
Any help on this issue would be greatly appriciated.
Kind regards, Ola Theander