roelandkim
Registered User.
- Local time
- Today, 05:25
- Joined
- Apr 8, 2003
- Messages
- 38
Hi all,
I'm in a bit of a bind trying to figure out how to accomplish this query, any help would be appreciated. I have a table called ApprovedCertification. This table contains the following fields:
PK, ParticipantPK, CertificationDate, CertificationType
I want to be able to compare the current CertificationDate to the previous CertificationDate for a ParticipantPK. In this table a Participant may have multiple records in the ApprovedCertification table.
I need to take this data:
PK, ParticipantPK, CertificationDate, CertificationType
1, 12, 1/2/2004, Annual
4, 12, 2/3/2003, Annual
5, 12, 1/18/2002, Annual
9, 12, 1/25/2001, Annual
And break it down into something like this:
PK, ParticipantPK, CertificationDate, CertificationType, PreviousCertification
1, 12, 1/2/2004, Annual, 2/3/2003
4, 12, 2/3/2003, Annual, 1/18/2002
5, 12, 1/18/2002, Annual, 1/25/2001
9, 12, 1/25/2001, Annual, NoPreviousCert
Any help pointing me in the right direction would be much appreciated.
Thanks,
Roeland Kim
I'm in a bit of a bind trying to figure out how to accomplish this query, any help would be appreciated. I have a table called ApprovedCertification. This table contains the following fields:
PK, ParticipantPK, CertificationDate, CertificationType
I want to be able to compare the current CertificationDate to the previous CertificationDate for a ParticipantPK. In this table a Participant may have multiple records in the ApprovedCertification table.
I need to take this data:
PK, ParticipantPK, CertificationDate, CertificationType
1, 12, 1/2/2004, Annual
4, 12, 2/3/2003, Annual
5, 12, 1/18/2002, Annual
9, 12, 1/25/2001, Annual
And break it down into something like this:
PK, ParticipantPK, CertificationDate, CertificationType, PreviousCertification
1, 12, 1/2/2004, Annual, 2/3/2003
4, 12, 2/3/2003, Annual, 1/18/2002
5, 12, 1/18/2002, Annual, 1/25/2001
9, 12, 1/25/2001, Annual, NoPreviousCert
Any help pointing me in the right direction would be much appreciated.
Thanks,
Roeland Kim
Last edited: