Code Snippet |
create table TableA(id int) insert into TableA values(1) insert into TableA values(2) create table TableB(id int) insert into TableB values(3) create table TableC(id int) select * from TableA select * from TableB |
Double clicking Data flow task we will get dataflow task window. Drag the OLEDB Source task.Double click OLEDB Source, you will get OLE DB Source editor. Set the OLE DB connection manager and select the table you want to migrate. Here we will select TableA. Click "Preview" button to check the
data.
Drag another OLEDB Source task.
Double click OLEDB Source task, you will get OLE DB Source editor. Set the OLE DB connection manager (connect to your server) and select the table you want to migrate. Here we will select TableB.Click "Preview" button to check the data.
Drag Union All task and double click this task, you will get Union All Transformation editor. Here you can map the output columns and input columns (You can change the input column as per your business functionality)
Drag OLE DB destination and double click it, you will get an editor.Select the destination database and table. Check the mappings located in the left side of the window. You can opt to keep the null values, identity values, whether you want the check the contraint and you can lock the table during data transfer. Click "Preview" button to check the existing data.
Regards,
Venkatesan Prabu .J
2 comments:
Hi VP,
I want to lload multiple source text files to corresponding Destination tables using just SSIS. I am not a .Net guy, so do not want to use Script Transformation.
Example,
I have 3 text files namely:
File_1.txt
File_2.txt, and File_3.txt.
I want to load these files to their corresponding table namely:
Table_1, Table_2, and Table_3.
I want to use it without using any .Net Code.
Please, help me doing this. I can be reached at: amoyeed@gmail.com.
Thanks,
Abdul Moyeed
Its too simple Abdul,
Put three sources and three destinations and you can point out as per my example.
It will work fine. You can use only one dataflow task to achieve it.
Thanks and Regards,
Venkatesan Prabu .J
Post a Comment