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.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Lookup Transformation

Author  Topic 

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2009-09-17 : 09:21:05
Hi,



I have a table Catalog with the column business_unit that is string.
I have another table that contains keys called BusinessUnit with the columns business_name and business_id (int).
I need to get the business_id from table BusinessUnit where catalog.business_unit =BusinessUnit.business_name.



I have a lookup transformation set up as follows:

Reference table tab:
Table: BusinessUnit

Columns tab:
Available Input Columns: businessunit_unit
Available Lookup Columns: businessunit_name.
The checked column is businessunit_id.

I want to update catalog.business_unit withe the BusinessUnit.business_id

However, this isn't working. no error just not updated. Instead new rows are added to the tabl Catalog. What am i doing wrong?

Thanks

Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-09-17 : 09:48:57
Why not use an Execute SQL task..with an update query like below

update A
set A.business_id = B.business_id
from Catalog A
inner join BusinessUnit B on A.business_unit = B.business_name
Go to Top of Page
   

- Advertisement -