anilvaghela
Registered User.
- Local time
- Today, 16:54
- Joined
- Sep 10, 2008
- Messages
- 12
hello...
I have a database which consists of 5 tables....
each table has the same fields but they are all linked.
Table 5 - Is joined by using the parent_id field which is linked to the unique_id on Table 4
And so on.... till Table 1.
Table 1 has data at level 1 on a hierarchy. So you will have for example 5 records in here. Which have its unique_id.
Table 2 will have for example 30 records which are grouped into the 5 records in Table 1. This is linked by the parent_id on Table 2 which is joined to unique_id on Table 1.
And so on for Table 3 which is joined to Table 2 and Table 4 joined to Table 3 and Table 5 joined to Table 4.
This is done and works fine.
But I want to be able to APPEND 1 of the 5 records first from Table 1 into a Main Table. Then go to Table 2 and APPEND only the FIRST Record which matches the unique_id from the record we appended from Table 1.
Then go to Table 3, 4 and then 5.
Then loop and go back to Table 2 not Table 1 as there maybe more records under Table 2 which maybe linked to the first record we appended from Table 1 and continue the same process... BUT IF not then Return to Table 1.... and so on!!!
.........................................................
It would be a great help if someone can help me as I am truly stuck!
Thanks!
I have a database which consists of 5 tables....
each table has the same fields but they are all linked.
Table 5 - Is joined by using the parent_id field which is linked to the unique_id on Table 4
And so on.... till Table 1.
Table 1 has data at level 1 on a hierarchy. So you will have for example 5 records in here. Which have its unique_id.
Table 2 will have for example 30 records which are grouped into the 5 records in Table 1. This is linked by the parent_id on Table 2 which is joined to unique_id on Table 1.
And so on for Table 3 which is joined to Table 2 and Table 4 joined to Table 3 and Table 5 joined to Table 4.
This is done and works fine.
But I want to be able to APPEND 1 of the 5 records first from Table 1 into a Main Table. Then go to Table 2 and APPEND only the FIRST Record which matches the unique_id from the record we appended from Table 1.
Then go to Table 3, 4 and then 5.
Then loop and go back to Table 2 not Table 1 as there maybe more records under Table 2 which maybe linked to the first record we appended from Table 1 and continue the same process... BUT IF not then Return to Table 1.... and so on!!!
.........................................................
It would be a great help if someone can help me as I am truly stuck!
Thanks!