Solved

N-Level Quiries (Hierarchical Retrieval)

Posted on 2001-06-23
4
214 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
On Key Down Access 2010 6 41
How to use fGetFullNameOfLoggedUser on Access 64 bit 5 36
ADODB problem 20 38
2 subforms 1 main form 1 13
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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