Easy way to use timestamp for updating warehouse

  • Our erp system has a timestamp column in each table, and so ideally I would like to compare the timestamp value from 'live' against the one in my 'staging' database along with the primary key and if different, then extract the record etc.

    Any ideas as the best way to do this? as there is a lot of data spread over many servers, and I cannot do incremental based off a create date etc.

    Thanks

  • Just to be sure what we are talking about. The timestamp is an actual date/time value, correct?

  • Nope, in Transact-SQL, a timestamp is a special binary field. so looks like this 0x00000000000007DA

    It is also called 'rowversion'

    This field gets updated every time the row is modified, so I can use the normal primary key to identify new and deleted records but changed records are the problem

  • sotn (8/14/2012)


    Nope, in Transact-SQL, a timestamp is a special binary field. so looks like this 0x00000000000007DA

    It is also called 'rowversion'

    This field gets updated every time the row is modified, so I can use the normal primary key to identify new and deleted records but changed records are the problem

    I know what a timestamp field is, but a lot of people also tend to call some datetime fields a timestamp as well. I wanted to be sure what you were talking about as well.

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

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