there is a single table contain:
id, name, referal_id
note: referal_id is referenced to id
sample data:
id, name, referal_id
1 aa null
2 bb 1
3 cc 1
4 dd 2
5 ee 2
6 ff 3
7 gg 3
bb(2) and cc(3) is level 1 referal to aa(1)
dd(4) and ee(5) is level 1 referal to bb(2)
dd(4), ee(5), ff(6) and gg(7) is level 2 referal to aa(1)
the case:
i need a query (in ms access) that show level 1 to level 7 "referal to"
(preferably from level 1 to level unlimited)
sample output:
referal id, id, name, level
1 2 bb 1
1 3 cc 1
1 4 dd 2
1 5 ee 2
1 6 ff 2
1 7 gg 2
2 4 dd 1
2 5 ee 1
3 6 ff 1
3 7 gg 1
thanks
2007-02-07
17:42:28
·
1 answers
·
asked by
deval_agrifarman
6
in
Computers & Internet
➔ Programming & Design