Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Datashaping in reverse!?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-09-19 : 15:36:26
Cesar C writes "I need to build a three-level nest(tree)!!!

but my problem is I have to start from the lowest level going up
and I have to display the data in the normal manner of (top level to bottom-level).

these are my tables

Table A
Fields: page_id, profile_id
A is linked to B through page_id

Table B
Fields: page_id, section_id, project_id, page_name
B is linked to C through section_id

Table C
Fields: section_id, section_name, project_id
C is linked to D through project_id

Table D
Fields: project_id, project_name

I have to display the project names with corresponding its sections(name) and section's pages(name)

it should appear as follows:
Project Name
----Section Name
--------Page Name
--------Page Name
----Section Name
--------Page Name
Project Name
----Section Name
--------Page Name
Project Name
----Section Name
--------Page Name
--------Page Name
--------Page Name
----Section Name
--------Page Name
--------Page Name
............ETC............

I need to display this; depending on the profile_id in table A
the profile_id is the current user

The apge should show the files the current user is working on and the corresponding project and section these files are in.

Should I change the table setup? or is there a way through datashaping or regular sql??

please respond ASAP, THaNK you "

   

- Advertisement -