Saving Query Results and Get notified when changed

  • Hi

    I have an ASP.NET application connecting to a SQL 2008 database. One piece of functionality I am trying to create is to allow users to run a query and then be notified when new records have been added to that query

    E.g. User runs a query asking for Firms based in US

    Rather than having to run this query all the time in order to find out if any new records have matching this criteria have been added, they can receive an email alert stating that changed have been made.

    What I have so far is that I will need to save the old dataset, run this query regularly and the compare the results and determine if any changes have been made and decide weather or not to send an email.

    Does anyone have any ideas on how best to do this e.g are there any tools out there I could use, any anything built into sql server i could use etc

    Thanks in advance

  • You could add a bit field indicating whether a notification was already sent out for the records to determine if they're new records or not.

    Eli

  • Look up Query Notifications in BOL (Books Online). It was a feature added in SQL Server 2005. This is probably what you are looking for.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply