Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
admin:sql_agent_job_history [2017/07/21 21:47]
127.0.0.1 external edit
admin:sql_agent_job_history [2019/12/05 21:00] (current)
admin
Line 9: Line 9:
  
  
-<file tsql JobHistory.sql>+<code tsql>
 ;WITH history AS ( -- convenience view of sysjobhistory presenting start/end dates as DATETIME ;WITH history AS ( -- convenience view of sysjobhistory presenting start/end dates as DATETIME
   SELECT ​   SELECT ​
Line 156: Line 156:
     AND s.StepStartTime BETWEEN j.JobStartTime AND j.JobEndTime     AND s.StepStartTime BETWEEN j.JobStartTime AND j.JobEndTime
   INNER JOIN msdb.dbo.sysjobs sj ON sj.job_id ​ = j.job_id   INNER JOIN msdb.dbo.sysjobs sj ON sj.job_id ​ = j.job_id
-</file>+</code>
  
 {{tag> tsql admin housekeeping agent}} {{tag> tsql admin housekeeping agent}}