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

Re-iterating search in SQL

Status
Not open for further replies.

russellobrien

Programmer
May 14, 2003
28
0
0
GB
Is the following possible in SQL?

I want to develop a hierarchy table with a list of objects that has the simple form below:

ID NAME PARENT CHILD

Where parent and child refer to parent(s) or child(ren) nodes. Can I develop a query that will say for instance find all child notes by iterating down repetitively til no children are found or do I need to programmatically do such a thing from my application itself
Many thanks,

Russell O'Brien
 
I would just go programmatic on this....higher end DBMS' like Orace actually have this functionality built into their SQL dialect, MS Access does not.

Mike Pastore

Hats off to (Roy) Harper
 
Thanks there.
I may be porting to SQL Server. I know we are in Access land here but can you suggest how the clever DBMS's go about implementing this or where there is a suitable site for info.

Thanks again,

Russell
 
include Parent/child Id.s in the record. Similar questions have been asked (and SOME information has been posted in response) in these fora. At least one response refers to "VISIO" as the program includes both a structure of htis nature and a query which generates the parent child listing. Annother reference should be found using "Linked List", as this it the basic (non-rdbms) term for the underlying process.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top