Hi friends,
I’d like to have your help. I have a SQL Server database, and a table dbo.OnData on it.
I would like to receive an email alert from my database if:
- within a range of 30mins from 8:00:00 a.m. opening time and default time per day
- AND 30mins after the time of the last Add in the dbo.OnData table,
t*here are no additions to the dbo.OnData table, a message like "from such time to such time, No Add to dbo.OnData table".*
Example:
Opening at 08:00:00,
From 08:00:00 to 08:30:00, there is no addition in the table, => Alert
From 08:30:00 to 9:00:00, 1 line has been added at 08:35:00 => No alert
From 08:35:00 (time when the last rows were added) to 08:35:00 + 00:30:00 i.e. 09:05:00, there is no addition in the table, => Alert
From 09:05:00 to 09:35:00, there are 20 lines added, last line time at 09:15:00 => No alert
From 09:15:00 to 09:45:00, there is no addition in the table => Alert
Would it be possible to do this?
Thanks in advance friends,