Linking of several tables in a heirarchical form

J

Jacob

I have a table, SYS_Locations, which lists all of the locations available
for a system.
I.E.:
1 -- Matrix Hall
2 -- Upstairs
3 -- Basement
4 -- Cabinet
5 -- Storage Building

Then, I have another table, LOC_TREE_REL which ties the previous locations
to one another.
I.E.:
1 -- 2 (Says Upstairs belongs in Matrix Hall)
5 -- 3 (Says Basement belongs in Storage Building)
3 -- 4 (Says the Cabinet is in the Basement which as shown in a previous
row, is in the Storage Building.)
All of the entries in LOC_TREE_REL include a self-ownership entry. (i.e. For
Matrix Hall, their is a 1 -- 1 entry, Upstairs has a 2 -- 2 entry, etc.

I need to be able to tie these locations together in some sort of list which
demonstrates heirarchy.

I'm considering using a drop-down select menu to do it such as:

Matrix Hall
---- Upstairs
Storage Building
---- Basement
---------Cabinet

However, I need some help with the code to perform such location connections
on-the-fly. Any help will be greatly appreciated.

Jacob
 
A

Aaron Bertrand [MVP]

Could you tell us what database and version you're using (SQL Server 7.0,
Access 95, FoxPro 2.0, dBase IV, Oracle 8i, etc.)?

And please follow up only in microsoft.public.inetserver.asp.db
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top