No, my kid ain't misbehavin'. I have account records that I need to associate with the parent record. the records have a unique record id (12345-26) and a parent ID (12345-18). The parent ID can also be 0 (no parent record) or it could refer to a parent ID that no longer exists. These relationships can go as deep as 6 or more "generations". Here is sample a RAW data set:
parent, child
12345-18, 12345-0
12345-26, 12345-18
12345-34, 12345-26
12345-48, 12345-18
12345-64, 12345-56
I need to ID the ultimate parent in order to have a third column field that reads 12345-18 for the first 4 records above, and 12345-64 for the last record (parent gone)
Is this a VBA routine or a union query or custom function? I cannot get past the 2nd generation level.
Anybody have a clue to help me out?
oh - and spanking didn't help.
Thanks!
parent, child
12345-18, 12345-0
12345-26, 12345-18
12345-34, 12345-26
12345-48, 12345-18
12345-64, 12345-56
I need to ID the ultimate parent in order to have a third column field that reads 12345-18 for the first 4 records above, and 12345-64 for the last record (parent gone)
Is this a VBA routine or a union query or custom function? I cannot get past the 2nd generation level.
Anybody have a clue to help me out?
oh - and spanking didn't help.
Thanks!