Daily export of the historical tables

  • Hi all!

    I have got a problem with DTS design for historical tables export from one SQL Server to another SQL Server. Historical tables are generated daily, and the name of the historical table has an extention dependent on the date, f.ex. HT_20060822,  HT_20060823 and so on. How can I create generic daily DTS for export? How can I create import table in the package which matches the name of the table for export? Thanks in advance.

  • The link here I believe will answer the daily backup issue with custom file name.

    http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1770

    You would just have to modify the script to use your file names and data selection criteria.

  • You could also create one or more global variables for your DTS package and concatenate the global variable onto a string variable with the first part of your table names.

    The date global variable can be formatted using CONVERT(varchar(8), GETDATE(), 112).

    There are multiple ways to accomplish this task depending on how much you want to stay with the package that exists or head in a new direction.

  • Thanks a lot for clarifying. Now I have to learn more about DTS global variables and dynamic properties task.

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

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