on 08-13-2020 10:08 PM
Experts,
I need to create alerts that are triggered once a day, but then not the next day. So if I set the Alert to Daily at 8am and the query still bring the same result the next day, I need it to not alert.
Is there a way to set that in the Alert?
How would I add that to the query: If the thing that triggers the query to have results have the same as current date?
Regards,
Marli Schutte
Hi Marli,
That's right, the only way to accomplish this is to bake a date check into your query. Please note that (assuming you are running on MS SQL) the GETDATE() function will also return a time component. That means that:
DocDate = GETDATE()
will not work, because DocDate is (for example) 14.08.2020 00:00:00 and GETDATE() returns 14.8.2020 8:39:45.
To circumvent this problem, you can do this:
DocDate = cast(floor(cast(GETDATE() as float)) as datetime)
I am not sure what the syntax is for HANA.
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
8 | |
5 | |
5 | |
4 | |
4 | |
3 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.