I’m trying to figure out how to complete my query. Any help would be greatly appreciated!
This is what I’m using to this point.
SELECT
co, queuedTime, startTime, completeTime,
DATEDIFF(MINUTE, queuedTime, completeTime) AS elapsedTime
FROM
SJob
WHERE
jobClass = 'PayrollFinish'
AND DATEDIFF(DAY, queuedTime, GETDATE()) = 0
ORDER BY
queuedTime
The only problem is I need queuedTime where job class = submitpayroll and completeTime where jobclass = payrollfinish
I’m new to sql and just kind of thumbing my way through.
So you query would look like this?