SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SSIS and Import/Export (2012)
 How to select multiple tables in SSIS
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vinodhg25
Starting Member

7 Posts

Posted - 01/15/2014 :  05:40:32  Show Profile  Reply with Quote
Hi,
How can i select multiple tables in SSIS

visakh16
Very Important crosS Applying yaK Herder

India
52323 Posts

Posted - 01/15/2014 :  06:26:50  Show Profile  Reply with Quote
multiple tables where? do you mean in data flow task? please elaborate.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

vinodhg25
Starting Member

7 Posts

Posted - 01/16/2014 :  01:00:27  Show Profile  Reply with Quote
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 MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs

[/quote]
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52323 Posts

Posted - 01/16/2014 :  05:11:01  Show Profile  Reply with Quote
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 MVP
http://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 MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000