Solved

N-Level Quiries (Hierarchical Retrieval)

Posted on 2001-06-23
4
205 Views
Last Modified: 2007-12-19
I wanted to know, how can I do a tree query on a table, which allows me to retrieve the entire tree structure or sub-tree structure using one query. For example if I wanted to list all data from the root to all the nodes (having id and parentid as the identifier in the table). As I understand Oracle has the features of "Connect BY PRIOR and START WITH" to allow me to do this, but what can I use in Access.

Thanks
0
Comment
Question by:denz_1
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
Nosterdamus earned 100 total points
ID: 6224211
Hi denz_1,

As far as I know, there isn't a stright-forward solution for this in access.

You might need to write your own code to achive what you want.

You'd probably need to create two new queries (or tables):
1. For the parents.
2. For the nodes.

Notice that a node can be a parent. In the case, it should show on both queries (tables).

If you need more help on this, please provide some more information about the structure of your tree, and what are the relationships within the tree.

HTH,

Nosterdamus
0
 
LVL 11

Expert Comment

by:joekendall
ID: 6517590
denz_1:

Did you receive an adequate answer? If not, please post again. If there is no answer, then you might want to have the question deleted and points refunded by contacting Customer Support.

Thanks!

Joe
0
 

Expert Comment

by:amp072397
ID: 6742597
denz_1 hasn't logged in since late September. Points will be awarded to Nost' unless they return now with a viable objection.

thanks!
amp
community support moderator
0
 

Expert Comment

by:amp072397
ID: 6783001
Points to Nost'.

amp
community support moderator
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now