Move records to a new table based on date

  • I assume a trigger is the easiest way to do this.  I would like to take all records from one table and move them to another table if they are over a year old.  Suggestions?

  • I do not see how a Trigger would be fired for records such as this..., I am assuming these are 'old' records which would probably not be accessed, hence a Trigger would not fire. 

    Write a stored procedured that is scheduled to run every night or once a week or whenever you find this appropriate...  

     

    I wasn't born stupid - I had to study.

  • ...or a DTS job. Either way depending on what tools you know.

     

  • You definitely want a scheduled job of some kind to do this.  A trigger would fire every time someone did an insert or update or delete depending on how you set up the trigger.  A scheduled job is better, you can pick a low utilization period to run the job and not impact your users.

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

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