|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, April 25, 2012 5:55 AM
Points: 19,
Visits: 69
|
|
Hi
i have table tab1 with columns a,b,c and table tab2 with columns x,y,z now i have to load the data into tab3 with columns a,b,x,y
so i have created two oledb sources (tab1 & tab2) and a oledb desitination(tab3) now which transformation should i use to get two columns(a,b) form tab1 and two columns(x,y) from tab2 and load into destination table tab3(a,b,x,y)
please let me know how to achieve this
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 5:49 AM
Points: 4,242,
Visits: 9,492
|
|
Feed the two sources into a Merge Join transformation and from there map to your destination table (I'm assuming that the two source tables can be joined, of course).
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 5:49 AM
Points: 4,242,
Visits: 9,492
|
|
Or ...
Instead of using the tables as your sources, use a query which includes the join. Then your data source is ready to go - this will be faster than MERGE JOIN in SSIS.
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, April 25, 2012 5:55 AM
Points: 19,
Visits: 69
|
|
Phil Parkin (12/3/2010) Or ...
Instead of using the tables as your sources, use a query which includes the join. Then your data source is ready to go - this will be faster than MERGE JOIN in SSIS.
HI Thanks for the reply it worked by selecting outer join but out put is
12 10 NULL NULL NULL NULL 66 667 NULL NULL 98 665 377 467 NULL NULL 1231 56 NULL NULL
iam expecting the below one a b x y 12 10 66 667 377 467 98 665 1231 56 NULL NULL
how to get like the above one
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 5:49 AM
Points: 4,242,
Visits: 9,492
|
|
If you have two data sets
Set 1 1, 2 3, 4
Set 2 a, b c, d
and you want to combine them to give something like
1, 2, a, b 3, 4, c, d
you need to find a way of linking set 1 and set 2. Otherwise who is to say that
1, 2, c, d 3, 4, a, b
is not correct?
So ... what is the link between your source data tables?
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, April 25, 2012 5:55 AM
Points: 19,
Visits: 69
|
|
| thanks a ton now i got it u mean to say that there should be a common key to join both the tables
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 5:49 AM
Points: 4,242,
Visits: 9,492
|
|
Yes exactly. Once you have that, you're in business.
Even if you just use Row_Number() to generate one on the fly ... (if you're not too fussy about which rows end up together).
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|