Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
themeMidnight
SELECT jobProj.ProjectID
     , ch.Target
     , ch.Label
	 , ch.DurationMilliseconds
	 , ch.Connection
	 , ch.message
	 , ch.AttemptDate
FROM history.t_CommandHistory ch 
    INNER JOIN jobs.t_JobLocationProjectIPRange AS jobProj ON jobProj.JobID = ch.JobID
WHERE ProtocolId=5 
  AND message LIKE '%Failed%' 
-- === Change this line ==== --
   AND jobProj.ProjectID = 1
-- ========================= --
ORDER BY AttemptDate DESC

Ping success

If you want to see the results of successful pings (for example to look at the round trip times) then add the word NOT in the WHERE clause

Code Block
SELECT jobProj.ProjectID
     , ch.Target
     , ch.Label
     , ch.DurationMilliseconds
     , ch.Connection
     , ch.message
     , ch.AttemptDate
FROM history.t_CommandHistory ch
    INNER JOIN jobs.t_JobLocationProjectIPRange AS jobProj ON jobProj.JobID = ch.JobID
WHERE ProtocolId=5
  AND message NOT LIKE '%Failed%'
-- === Change this line ==== --
   AND jobProj.ProjectID = 1
-- ========================= --
ORDER BY AttemptDate DESC