We have a table which is refreshed everyday by the following process
- Download text file from Remote server
- Truncate existing table
- Insert data from text file to the table
Here is the sample structure for our table
CREATE TABLE dbo.mytable ( cola NVARCHAR(10) NULL, colb NVARCHAR(10) NULL ) ON [PRIMARY] go INSERT INTO dbo.mytable VALUES ('R1', '100') INSERT INTO dbo.mytable VALUES ('R2', '150')
The records rarely changes everyday and therefore we usually get the text file with exactly the same records. As the changes of the table may be critical, we would like to monitor the changes on table records. For example, we need to know if the colB of
R2 changes from '150' to '200' on 12-12-2012
We understand that there is option for change tracking in table setup. However, we are not sure whether truncate table in Step2 clears all our changes and system assumes all records are new. If the change tracking option cannot help us, we need to create an application and table that monitor the changes.
Thank you for help