Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Cry
Starting Member
24 Posts |
Posted - 2009-01-22 : 12:15:28
|
Hi,im just new to SSIS and i have a problem understanding the lookup transformation.Here is what i want to do.I have a stream and a table:stream Akd_idkdnrsome more fields...table Bkdnrkd_idkdnamestream A has rows where kdnr is filled and kd_id is NULLtable B is filled (every row has all fields set)what i now want to do is, to fill kd_id in stream A by a lookup transformation, but i dont understand how to do....what i have done until now is, to place a refference between kdnr of stream A and kdnr of table B. I dont know how to "copy" kd_id of table B to kd_id of stream A.thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-22 : 12:20:42
|
just use select kdnr,kd_id from tableB as query inside lookup task, then map between kdnr columns in table and give option as replace original column. automatically you'll get the matching values from tableB in the pipeline instead of tablea's column (blank). then use it for rest of your logic. |
 |
|
Cry
Starting Member
24 Posts |
Posted - 2009-01-22 : 13:30:09
|
Sorry, i forgot to mention that kd_id is of type int and kdnr of type string, so that i think the replacement will fail. is this correct? |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-23 : 11:29:13
|
ok. then use add as a new column and in end,map it to destination. |
 |
|
|
|
|