Sage 100

 View Only
  • 1.  Sage Alerts SQL Statement

    Posted 02-18-2020 09:27
    Hi everyone,

    My co-worker is trying to write a SQL statement for Sage Alerts and is needing a little help. Are there any SQL writers here who might be able to give her some direction? Here is her message:

    Would anyone be willing to share a SQL statement that tracks "Changes" in a SQL Server Database? I'm trying to use Sage Alerts and Workflow w/Sage 100 Premium and I want to be alerted when a SO field changes from "Y" to "N" and have to use the SQL view to do so. Vineyardsoft is great with support but this is out of scope. Thanks.

    Thanks all!



    ------------------------------
    Jesse Braun
    Vrakas/Blum Computer Consulting, Inc.
    ------------------------------


  • 2.  RE: Sage Alerts SQL Statement

    Posted 02-18-2020 11:57
    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
    ------------------------------



  • 3.  RE: Sage Alerts SQL Statement

    Posted 02-18-2020 13:53
    Edited by Kevin Moyes 02-18-2020 13:55
    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
    ------------------------------



  • 4.  RE: Sage Alerts SQL Statement

    Posted 02-18-2020 17:53
    Thank you yes. Dana mentioned she was getting good responses on Sage City and didn't need me to post here anymore, but I had already put it up! Thank you both for your responses, I have forwarded along.

    Have a great one!

    ------------------------------
    Jesse Braun
    Vrakas/Blum Computer Consulting, Inc.
    ------------------------------



  • 5.  RE: Sage Alerts SQL Statement

    Posted 02-19-2020 11:50
    Thanks again everyone, here is a note from Dana.

    Thank you all for your replies. I ended up linking on multiple columns on the Links tab and not having to write a sql statement and then using the built in field change tracking feature that is on the filter tab. Didn't' realize you could do this without a sql statement.

    Appreciate your help!



    ------------------------------
    Jesse Braun
    Vrakas/Blum Computer Consulting, Inc.
    ------------------------------