Discussion:
Best approach to run Comparison Queries
(too old to reply)
Andy
2012-02-24 18:42:55 UTC
Permalink
Dear group users,

sorry for my ignorance in advance

I am wondering what is the best way to have SQL server run a query on
a regular basis and compare the data in the current execution with a
previous dataset.

My aim is to track changes that are occurring in the query's dataset
over a course of time indefinitely.

I am using SQL2005 and have SSRS up an running also.

Thanks in advance for any suggestions.

Best
Andy
Erland Sommarskog
2012-02-24 19:07:42 UTC
Permalink
Post by Andy
sorry for my ignorance in advance
I am wondering what is the best way to have SQL server run a query on
a regular basis and compare the data in the current execution with a
previous dataset.
My aim is to track changes that are occurring in the query's dataset
over a course of time indefinitely.
I am using SQL2005 and have SSRS up an running also.
Thanks in advance for any suggestions.
The best option would be to use Change Tracking, but that feature was
added in SQL 2008.

Then again, if it's a specific query, one option is Query Notification
which means that you wait until the result changes. From .Net you
would use the SqlDependency or SqlNotification classes.
--
Erland Sommarskog, SQL Server MVP, ***@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
Loading...