Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vinodhg25
Starting Member
7 Posts |
Posted - 2014-01-15 : 05:40:32
|
Hi,How can i select multiple tables in SSIS |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-01-15 : 06:26:50
|
multiple tables where? do you mean in data flow task? please elaborate.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
vinodhg25
Starting Member
7 Posts |
Posted - 2014-01-16 : 01:00:27
|
Hi Vishak,I have some tables in source db. I need to select all tables from source db and i need to compare those tables with destination db. In case of any difference between the data. That data should be inserted in destination db.(Assume that both source and destination db have same table structure).------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs[/quote] |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-01-16 : 05:11:01
|
quote: Originally posted by vinodhg25 Hi Vishak,I have some tables in source db. I need to select all tables from source db and i need to compare those tables with destination db. In case of any difference between the data. That data should be inserted in destination db.(Assume that both source and destination db have same table structure).------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs
[/quote]you need to have a series of data flow tasks for that unless all your tables have same structure. If they're all having same structure then you can use a single data flow task inside a ForEachLoop container.The ForEachLoop container should use ADO Recordset enumerator and should map to an object variable created inside SSIS. the variable need to be populated with table names prior to loop step using a execute sql task and with query based on INFORMATION_SCHEMA.TABLES to get table names.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|