S
SteveS
I hate queries with dates!!
I have a database to keep track of rank promotions in our Karate school. I am
trying to keep a history of the date of promotion.
My tables are:
tblNames
lngNameID (PK AN)
txtLName
txtFName
tblPromotions
lngPromotions (PK AN)
lngNamesID_FK
lngRankID_FK
dtePromotionDate
bytOrder
txtHomeDojo
tblRank
lngRanksID (PK AN)
txtRank
I can write a query to get the highest rank for each person, but when I add in
the date field, I get all promotion ranks and dates. I should have only a
persons name one time in the report with his highest rank and date or promotion.
So if John Smith's promotions are
lngRankID_FK dtePromotionDate txtRank
12 1/10/2006 (4th Kyu)
11 7/1/2006 (3rd Kyu)
and Jim Jones' promotions are:
12 5/16/2004 (4th Kyu)
11 12/03/2004 (3rd Kyu)
10 5/28/2005 (2nd Kyu)
the report should look like:
Date Name Rank Order Home Dojo
------------------------------------------------------
05/28/2005 Jones, Jim 2nd Kyu T
07/01/2006 Smith, John 3rd Kyu TN
The order field is to show who received their belt first if two or more people
were promoted on the same day. Seniority is everywhere...
Any help with the query is greatly appreciated.
I have a database to keep track of rank promotions in our Karate school. I am
trying to keep a history of the date of promotion.
My tables are:
tblNames
lngNameID (PK AN)
txtLName
txtFName
tblPromotions
lngPromotions (PK AN)
lngNamesID_FK
lngRankID_FK
dtePromotionDate
bytOrder
txtHomeDojo
tblRank
lngRanksID (PK AN)
txtRank
I can write a query to get the highest rank for each person, but when I add in
the date field, I get all promotion ranks and dates. I should have only a
persons name one time in the report with his highest rank and date or promotion.
So if John Smith's promotions are
lngRankID_FK dtePromotionDate txtRank
12 1/10/2006 (4th Kyu)
11 7/1/2006 (3rd Kyu)
and Jim Jones' promotions are:
12 5/16/2004 (4th Kyu)
11 12/03/2004 (3rd Kyu)
10 5/28/2005 (2nd Kyu)
the report should look like:
Date Name Rank Order Home Dojo
------------------------------------------------------
05/28/2005 Jones, Jim 2nd Kyu T
07/01/2006 Smith, John 3rd Kyu TN
The order field is to show who received their belt first if two or more people
were promoted on the same day. Seniority is everywhere...
Any help with the query is greatly appreciated.