Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help needed
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00803853
Message ID:
00804103
Views:
19
hi

in previous message i forgot to put the keys, here is the message again
i've a table structure (recursive) like this

Seq --descr ----------pseq ---lvl
1-----Master -------- 0 ------0
2-----customer------- 1 ------1
3-----supplier------- 1 ------1
4-----Customer List-- 2 ------2
5-----Supp. List----- 3 ------2

the structure of the table
Seq= is Primary Key
Pseq= is Foriegn key to the Seq (recursive foreign key)
Lvl= is the level(depth) of the item, that at which level in the Heirarchy the item is place e.g. (0=Top,1=Item with 1 parent,2=item with 1 parent leading to another parent and so on)

there is no other table used and the parents and childs are in the same table, use can define unlimited levels.

now i want the desired result like this

Seq --descr ----------pseq ---lvl
1-----Master -------- 0 ------0
2-----customer------- 1 ------1
4-----Customer List-- 2 ------2
3-----supplier------- 1 ------1
5-----Supp. List----- 3 ------2

means that the Parent then list of child and if any child has further child then it should come right under it and so on for all the record. the heirarchy should be in a sequence of parent --> child --> child .... and so on

Thanks in advance
Anwar
Previous
Reply
Map
View

Click here to load this message in the networking platform