dbTalk Databases Forums  

Using a variable for a table name in SSIS

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


Discuss Using a variable for a table name in SSIS in the microsoft.public.sqlserver.dts forum.



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

Default Using a variable for a table name in SSIS - 11-23-2005 , 12:48 PM






In setting up a datawarehouse we're starting out with about 30 tables
that need to be transfered. What I would LIKE to do is build a lookup
table that holds the Names of those tables in their source, and the
names we are going to use in the warehouse, then cycle through that
list with a ForEach Container to copy the table, compare to the
previous days table, log if different drop previous and rename the new
one.

Easy 4 step Control Flow dtsx.

question is. How can I get the table name out of the lookup table and
use it in my package?

I've seen how to set the server/catalog in a config file (nice for
connection stores!) But Has anyone tried pulling in multiple table
names yet?

Ches Weldishofer
Clear Channel


Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Using a variable for a table name in SSIS - 11-23-2005 , 02:00 PM






Ches Weldishofer wrote:
Quote:
In setting up a datawarehouse we're starting out with about 30 tables
that need to be transfered. What I would LIKE to do is build a lookup
table that holds the Names of those tables in their source, and the
names we are going to use in the warehouse, then cycle through that
list with a ForEach Container to copy the table, compare to the
previous days table, log if different drop previous and rename the new
one.

Easy 4 step Control Flow dtsx.

question is. How can I get the table name out of the lookup table and
use it in my package?

I've seen how to set the server/catalog in a config file (nice for
connection stores!) But Has anyone tried pulling in multiple table
names yet?

Ches Weldishofer
Clear Channel

To drive a loop off a table, get the data into a variable using an Exec
SQL Task, results as full row set. Then For Each Loop with the ADO
enumerator to get the values out and split them into variables for use
within the loop.

--
Darren
http://www.sqldts.com
http://www.sqlis.com


Reply With Quote
  #3  
Old   
Ches Weldishofer
 
Posts: n/a

Default Re: Using a variable for a table name in SSIS - 11-28-2005 , 09:07 AM



Thank you Darren, but that wasn't the problem.

The problem is getting SSIS to recognize a variable as a table name
when setting up the destination. From what I can see you can only
choose an existing table, or create a new table. The Tablename field
does not allow you to type in a variable or a tablename.

(Hopefully they'll change that part, since it's often faster to type in
a table name than search it in a list)


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.