Solved

N-Level Quiries (Hierarchical Retrieval)

Posted on 2001-06-23
4
215 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

749 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