TheInsider
Programmer
Hi,
I have a parent and child table as follows:
Is it possible to create a Union Query, or any type of query, that would provide the following results:
I have tried everything, but I can't figure out how to sort the child N's within the parent N's. I don't think that it is even possible.
Thanks
I have a parent and child table as follows:
Code:
Table P:
PID N
--- ---
1 A
2 D
3 B
4 C
Table C:
CID PID N
--- --- ---
1 1 a1
2 1 a2
3 2 d1
4 2 d2
5 3 b1
6 3 b2
7 4 c1
8 4 c2
9 1 a3
10 4 c3
Is it possible to create a Union Query, or any type of query, that would provide the following results:
Code:
N CID
--- ---
A
a1 1
a2 2
a3 9
B
b1 5
b2 6
C
c1 7
c2 8
c3 10
D
d1 3
d2 4
I have tried everything, but I can't figure out how to sort the child N's within the parent N's. I don't think that it is even possible.
Thanks