Hi,
I'm trying to join two tables, whereby the first table has unique records, the second table then has multiple records assigned against the primary key of the first table.
Basically I'm looking for a query which lists the top 20 records from the first table with an extra field stating the number of records associated to it in the second field.
i.e.
Table 1
T1PK
1 Field1_1 Field1_2 Field1_3
2 Field2_1 Field2_2 Field2_3
3 Field3_1 Field3_2 Field3_3
Table 2
T2PK T1PK
1 Field1_1 1
2 Field2_1 1
3 Field3_1 3
Results
T1PK Count
1 Field1_1 Field1_2 Field1_3 2
2 Field2_1 Field2_2 Field2_3 0
3 Field3_1 Field3_2 Field3_3 1
Having racked my brains for ages and got nowhere any help would be gratefully appreciated.
Rob Waite
I'm trying to join two tables, whereby the first table has unique records, the second table then has multiple records assigned against the primary key of the first table.
Basically I'm looking for a query which lists the top 20 records from the first table with an extra field stating the number of records associated to it in the second field.
i.e.
Table 1
T1PK
1 Field1_1 Field1_2 Field1_3
2 Field2_1 Field2_2 Field2_3
3 Field3_1 Field3_2 Field3_3
Table 2
T2PK T1PK
1 Field1_1 1
2 Field2_1 1
3 Field3_1 3
Results
T1PK Count
1 Field1_1 Field1_2 Field1_3 2
2 Field2_1 Field2_2 Field2_3 0
3 Field3_1 Field3_2 Field3_3 1
Having racked my brains for ages and got nowhere any help would be gratefully appreciated.
Rob Waite