Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading/updating one target table with two sources 1

Status
Not open for further replies.

coolspartan

Programmer
Oct 21, 2004
7
US
Hi,
there are two source tables S1 and S2. I am interseted in a coulum from each source, Columns s1c1 (Source S1) and s2c1 (Source S2).

I will have to load the target Table T1 with s1c1 and s2c2.
There are two columns in T1, PK_ID (Primary key) and t1c1.

t1c1 is to be populated from s1c1 and s2c1, and populate PK_ID with a unique number as it is a primary key field.

How to deal with this situation? Could this be done in one mapping or two mappings?

Thanks in advance.
 
Use one mapping, two sources and one source qualifier.
Define an override SQL expression (union) and use a seqence-generator to create a key further in the mapping.

Looks a little odd,but I use this all the time to merge data from different environments to one target.....

Ties Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top