Your date and time need to be a single field.
This query works for the combined date time --
SELECT Q.techician, Q.Date, [job ID], (SELECT COUNT(*) FROM Brian_A Q1
WHERE Q1.[techician] = Q.[techician]
AND Q1.Date < Q.Date)+1 AS Rank
FROM Brian_A AS Q
ORDER BY Q.techician, Q.Date, [job ID];
If your date and time fields are datatype DateTime then you can use this --
SELECT Q.techician, Q.Date, Q.[time started], [job ID], (SELECT COUNT(*)
FROM Brian_A Q1
WHERE Q1.[techician] = Q.[techician]
AND Q1.Date+Q1.[time started] < Q.Date+Q.[time started])+1 AS Rank
FROM Brian_A AS Q
ORDER BY Q.techician, Q.Date, [job ID];
If those fields are not DateTime then it depends a whole lot of the type and
structure of the contents.
--
KARL DEWEY
Build a little - Test a little
Brian said:
I have a list of calls done by technician in chronological order. I would
like to assign a count by call so it shows this is job 1, job 2, job 3, etc.
My 4 fields are date, job ID, techician, and time started.
Any ideas?
Thank you in advance,
Brian