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

representing a recursive/self join table as a multi-level dimension

Status
Not open for further replies.

rek

Programmer
Aug 11, 1999
1
ZA
One of the things that I have been trying to solve, is how to represent a recursive/self join table as a multi-level dimension. <br>
For example, you have a team table that is joined to itself to create a team hierarchy - (with the following fields : team#, teamdescr, parentteam# - where parent team number joins to team#)<br>
<br>
How do you represent this ?
 
This sounds more like a Relational question than a OLAP/Multidimensional question. Forgive me if I have misunderstood...<br>
<br>
You have represented the relationship (one to many recursive) properly in your table.<br>
<br>
An example SQL statement to retrieve team info including parent team (self join) would look something like this:<br>
<br>
SELECT Team.team, Team.teamdescr, ParentTeam.teamdescr<br>
FROM Team LEFT JOIN Team AS ParentTeam ON Team.team = ParentTeam.parentteam<br>
<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top