This isn't done in SQL. As mentioned on Sage City, if you need to only trigger the alert for orders that were previously "Y", unless KS / SA&W allows a clause including the "old value", I believe a simple "track changes" alert will trigger for new records too (which I understand you don't want).
You'd need another field to track whether the field was ever "Y" (used as a filter)... Ideally KS would allow you to look at the old value (other than old value <> new value), but I don't know if that is possible.
------------------------------
Kevin Moyes
Technical Systems Analyst
Munjal White Consulting Co.
Toronto ON
------------------------------
Original Message:
Sent: 02-18-2020 11:57
From: alan niergarth
Subject: Sage Alerts SQL Statement
This is from Jeremy Fox...
He needs to create a unique column by doing a custom calculation, set it as unique then in the "event" click the "track changes" box. ALL columns that are selected will be tracked so filtering for N or Y would be advised.
------------------------------
alan niergarth
Velosio LLC
------------------------------