I followed the steps in this thread and it worked well, except the numbering is in the opposite order of what I would like. The oldest date I would like the numbering to start at 1, then 2 etc. Based on duplicate EE ID #s.
I have tried sorting it in the org query by EE# then date oldest to newest, then newest to oldest. I have swapped out the order by in the SQL below and I am not getting the result I was hoping for.
SELECT T1.EMP_NBR, T1.term_date, (SELECT COUNT(*)+1 FROM qry_all_term_dates WHERE T1.EMP_NBR = EMP_NBR AND t1.[term_date]<[term_date]) AS GrpSeq
FROM qry_all_term_dates AS T1
ORDER BY T1.EMP_NBR, T1.term_date DESC;
I have tried sorting it in the org query by EE# then date oldest to newest, then newest to oldest. I have swapped out the order by in the SQL below and I am not getting the result I was hoping for.
SELECT T1.EMP_NBR, T1.term_date, (SELECT COUNT(*)+1 FROM qry_all_term_dates WHERE T1.EMP_NBR = EMP_NBR AND t1.[term_date]<[term_date]) AS GrpSeq
FROM qry_all_term_dates AS T1
ORDER BY T1.EMP_NBR, T1.term_date DESC;