E
Emma Hope
Hi All,
I have two tables with a one to many relationship, one table has a single
record with an autonumbered field for Clients, the other table (for delays)
has a many records per client, linked by the same number as on the Client and
also have a unique autonumbered field i.e.
Client table
ID
1 Joe Bloggs
2 John Smith
3 M. Mouse
Delay table
ID ClientID Comment
1 1 Reason1
2 1 Reason2
3 1 Reason1
4 2 Reason7
5 2 Reason3
6 2 Reason2
7 2 Reason2
I need to report on the last three delays for each Client ID, is there any
way i can number as follows:
ID ClientID Comment Number
1 1 Reason1 1
2 1 Reason2 2
3 1 Reason1 3
4 2 Reason7 1
5 2 Reason3 2
6 2 Reason2 3
7 2 Reason2 4
and then pick out numbers 1, 2, & 3 for ClientID 1 and 2, 3 & 4 for ClientID
2 or any other way of doing this, using 'max' or 'last' only gives me the
last one reason.
Thanks
Emma
I have two tables with a one to many relationship, one table has a single
record with an autonumbered field for Clients, the other table (for delays)
has a many records per client, linked by the same number as on the Client and
also have a unique autonumbered field i.e.
Client table
ID
1 Joe Bloggs
2 John Smith
3 M. Mouse
Delay table
ID ClientID Comment
1 1 Reason1
2 1 Reason2
3 1 Reason1
4 2 Reason7
5 2 Reason3
6 2 Reason2
7 2 Reason2
I need to report on the last three delays for each Client ID, is there any
way i can number as follows:
ID ClientID Comment Number
1 1 Reason1 1
2 1 Reason2 2
3 1 Reason1 3
4 2 Reason7 1
5 2 Reason3 2
6 2 Reason2 3
7 2 Reason2 4
and then pick out numbers 1, 2, & 3 for ClientID 1 and 2, 3 & 4 for ClientID
2 or any other way of doing this, using 'max' or 'last' only gives me the
last one reason.
Thanks
Emma