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 2008 Forums
 SSIS and Import/Export (2008)
 SSIS Package with(Derived Column & Lookup)

Author  Topic 

lemondash
Posting Yak Master

159 Posts

Posted - 2012-09-27 : 06:20:17
Hi All,

I have a SSIS package that has data in a table. I have a OLE DB Source to connect to the table but i need to do a look up to populate a field within that table. But the field i'm looking up on the destination is nvarchar and the source field is an int and the SSIS componet for look up dosen't allow lookup's with different data types. Can i change this with a derved column ?

I could change the the data types on the tables but their both populated form external sources.

Thank you in advance.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-09-27 : 10:34:59
Instead of simply pointing to table in lookup task you can use a query as source and in query you can do cast

ie like

SELECT othercolumn,CAST(yourlookupcolumn AS int) AS Lookupcolumn
FROM destination

then link between source and destination columns

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -