dbTalk Databases Forums  

Parameter

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Parameter in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AAA
 
Posts: n/a

Default Parameter - 06-26-2006 , 04:03 PM






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.



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Parameter - 07-01-2006 , 05:47 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

Quote:
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.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.