Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to maintain previous and record count in audit table in SQL Server 2008 r2?

$
0
0

Hi Experts ,

 Situation :

in our database we are having few of stored procedures which will drop and recreates the tables and it is scheduled on weekly basis. when this job will run all the stored procedures will drop all the tables and recreate. Now we need to create one table which will maintain history of the records.
my table structure is listed below

TableName CurrentReocrdCount CurrentExecutionDate PreviousReordCount PreviousExurtiondate
TEST         1000                   2014-03-30            NULL        NULL
Test         1500                   2014-04-10            1000      2014-03-30
Test         2000                   2014-04-11            1500      2014-04-10 

How do i achive this . 


franklinsentil


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>