dbTalk Databases Forums  

Dynamic Table Names in DTS

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


Discuss Dynamic Table Names in DTS in the microsoft.public.sqlserver.dts forum.



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

Default Dynamic Table Names in DTS - 07-19-2004 , 03:40 PM






I am new to DTS packages and not familiar with the object
model. I want to simply pull the results of a query on
one Server to another and save the results in a table
based on the date.

I have figured out a way to name a table I created based
on a text and date combination (i.e. BR200407) using DTS
Dynamic Properties and global variables, but it just
doesn't seem clean. Like I said, it works, just feels
like there is a better way. I would greatly appreciate
any suggestions. Thanks.

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

Default Re: Dynamic Table Names in DTS - 07-20-2004 , 02:25 AM






If the results of the Query have the same metadata and all you want to do is
change the name of the table each time then I personally would

1. Use an Active Script task to define the table that will be executed from
the SQLStatement property of the ExecuteSQL task You can build the table
name dynamically in this script.
2. Set that table as the destination(DestinationObjectName)

Have a look here

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



--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jeremy" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am new to DTS packages and not familiar with the object
model. I want to simply pull the results of a query on
one Server to another and save the results in a table
based on the date.

I have figured out a way to name a table I created based
on a text and date combination (i.e. BR200407) using DTS
Dynamic Properties and global variables, but it just
doesn't seem clean. Like I said, it works, just feels
like there is a better way. I would greatly appreciate
any suggestions. Thanks.



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.