I am trying to create an alert that will fire off an email based on the node custom property "SupportExpiration", which is in a date/time format. The time portion will be left blank. It should return nodes if the property is defined and is 90 days or less in the future.
I did some research, but the closest solution similar to mine I could find led me to this WHERE clause with the standard Custom SQL Alert trigger condition query:
SELECT Nodes.Caption, Nodes.NodeID FROM Nodes
WHERE
{
(Nodes.SupportExpiration IS NOT NULL) AND
(GETDATE() > DATEADD(Day, -90, Nodes.SupportExpiration))
}
This does not evaluate. I am very rusty on my SQL skills, and will continue to tinker with it and see if I can get it working. I would guess I'm not referencing the custom variable right, but I'm not sure how else to do it.
If anyone has any corrections/suggestions on what I might try, I'd definitely appreciate it.