?
Solved

N-Level Quiries (Hierarchical Retrieval)

Posted on 2001-06-23
4
Medium Priority
?
217 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
Nosterdamus earned 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

765 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