all groups > sql server dts > june 2006 >
You're in the

sql server dts

group:

Parameter


Parameter AAA
6/26/2006 2:03:02 PM
sql server dts: I am new to DTS development. Can you please tell me the easiest way to
create a package that will create tables each month that will be the same
except for the month name.

What I am trying to do is copy data from existing tables into archival
tables each month. i.e. In May - copy data from employees into
052006employees from accounts into 052006accounts. What I want to avoid is
having to change the script each month to reflect the new month as there are
several tables. I would like to place a parameter in at some point and have
this reflected throughout the script. Is this possible?

I hope this is clear enough - any help would be greatly appreciated.

Re: Parameter Allan Mitchell
7/1/2006 3:47:05 AM
Hello AAA,

Sure


The first thing you will need to do is issue a CREATE TABLE statement using
an ExecuteSQL task against the destination connection.
You will then change the DestinationObjectName property of the Transform
data task to point to this new table


Here are some code snippets that will help

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)


Changing the DataPump Source and Destination Tables
(http://www.sqldts.com/default.aspx?213)

Allan

[quoted text, click to view]

AddThis Social Bookmark Button