Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Add a column with a value from another source Expand / Collapse
Author
Message
Posted Tuesday, January 29, 2013 1:52 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 20, 2013 2:01 AM
Points: 8, Visits: 37
Hello there,

i'm using SSIS 2012 .

i have 2 sources ( xml files) in 1 data flow and from each source i have data .

from source A i got multiple rows with 2 columns.( name,age)

from source B i got only 1 row and 1 column (CITY)...means i have only one value which is "NYC"

i want to eventually to join the city (again,there is only 1 value) to the other data (name,age)

the result would be:

name, age,city

jenny,17,NYC
bob,22,NYC
lee,23,NYC

how do i do that?

thanks




Post #1412815
Posted Tuesday, January 29, 2013 2:41 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, May 09, 2013 8:00 AM
Points: 68, Visits: 64
Try to use " Lookup Dataflow item"
Post #1412839
Posted Tuesday, January 29, 2013 2:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 20, 2013 2:01 AM
Points: 8, Visits: 37
Guitar_player (1/29/2013)
Try to use " Lookup Dataflow item"


Lookup wont work since there is no common key between these 2 tables...

Post #1412840
Posted Tuesday, January 29, 2013 4:53 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 9:39 AM
Points: 4,247, Visits: 9,500
You could try a MERGE JOIN from t1.name to t2.city, join type = FULL.

____________________________________________________________________________________________

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.
Post #1412929
Posted Thursday, January 31, 2013 11:52 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: 2 days ago @ 12:51 PM
Points: 54, Visits: 279
have that city column value into a variable and use derived column
Post #1414275
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse