Training Explorer based on Birthmonth
Status: Inactive
Brought to you by:
hooptie
BJACH, FT Polk.
BJACH would like the Training Explorer to base training
defficiencies on a persons Birthmonth and not the last
time the individual took the training.
If an individual took training in May and his birthmonth
was in Feburary. The individual would be deficient for
training as of Feburary.
Logged In: YES
user_id=704425
MAHC would like this as well
Logged In: YES
user_id=97668
You need to write an update statement that changes
repltrainingdata.lastdatetaken and
repltrainingdata.daysuntildue using the following logic:
IF year(lastdatetaken) = year(getdate()) THEN
IF month(lastdatetaken) < month(dob) THEN
lastdatetaken = (year(lastdatetaken)-1) + month(dob) + 1
ELSE
lastdatetaken = year(lastdatetaken) + month(dob) + 1
END IF
ELSE IF
IF month(lastdatetaken) < month(dob) THEN
lastdatetaken = (year(lastdatetaken)-1) + month(dob) + 1
ELSE
lastdatetaken = year(lastdatetaken) + month(dob) + 1
END IF
END IF
I'm 90% sure this logic is valid; however, I need more time to
prove it using SQL scripts. Sadly, it's at the end of the day
and I don't have time to finish it -- I will follow up on this by
the end of the day on Thursday, Apr 15.