Hello looking for a trigger to alert me if my queue table has data in it like this:
Select CONVERT(NVARCHAR, datestarted, 120) as BatchDate,
getdate() as RptDate,
CONVERT(varchar(5),DATEADD(minute, DATEDIFF(minute, datestarted, getdate()), 0), 114) as qTimeElapse,
"SendAlert" = CASE WHEN DATEDIFF(minute,datestarted,getdate()) >= 30 THEN 'YES' ELSE 'NO' END
from [queue]
I would like to have SQL mail alert me. Unless their is a better way than a trigger. Thanks