Kiwiman
Registered User
- Local time
- Today, 23:25
- Joined
- Apr 27, 2008
- Messages
- 799
Afternoon
I am trying to denormalise a child table in a query for a specific task so that all child lines show on one line but the fields are not concatenated.
Table1 - Parent
PID Desc
1 Danny
2 Jonny
3 Andy
Table2 - Child
ID CID PID Destination
1 1 1 London
2 2 1 Paris
3 1 2 New York
4 1 3 Albany
5 2 3 Malaga
6 3 3 Texas
Query Output (7 separate fields)
PID Desc CID Destination CID2 Destination2 CID3 Destination3
1 Danny 1 London 2 Paris
2 Jonny 1 New York
3 Andy 1 Albany 2 Malaga 3 Texas
I can do this with subqueries linked together, but was wondering if there was a more dynamic option to do this via vba.
Thanks as always.
I am trying to denormalise a child table in a query for a specific task so that all child lines show on one line but the fields are not concatenated.
Table1 - Parent
PID Desc
1 Danny
2 Jonny
3 Andy
Table2 - Child
ID CID PID Destination
1 1 1 London
2 2 1 Paris
3 1 2 New York
4 1 3 Albany
5 2 3 Malaga
6 3 3 Texas
Query Output (7 separate fields)
PID Desc CID Destination CID2 Destination2 CID3 Destination3
1 Danny 1 London 2 Paris
2 Jonny 1 New York
3 Andy 1 Albany 2 Malaga 3 Texas
I can do this with subqueries linked together, but was wondering if there was a more dynamic option to do this via vba.
Thanks as always.