Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Sunnyvale, CA USA

    Unanswered: Detecting whether table contents have changed

    If I start with table1 and take a copy of it, call it table2.
    How can I later determine whether there have been any changes have been made to table2 since the copy (so I can determine whether I need to copy back the changes to table1).

    I'd like to use a 'last-updated-date' on the table, but I can't seem to find anything like that in the system tables.

    I'm considering using:
    exec sp_table_validation
    to get checksums of table1 and table2 (I have no image, text or ntext fields) so this should work fine, though might be slow (since I'd have to select the full count(*) option).
    I'd prefer to use timestamps if they're available.

    And no, I don't want to use triggers.


    - Andy Abel

  2. #2
    Join Date
    May 2002
    Other than using to trigger to *log* changes, you would have to do a full table *scan* to find the differences. This sure would take a long time to step through a large table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts