Derived column using for lookup..
Hi,
i have a lookup table with an ID and Desc columns
i get some flatfile which has the desc in that,if that desc is null then i assign a value say "Unknown" using an derived column..
My flow using 2 lookups on diff tables then i do an merge join to the destination table..
My problem is i am not able to do an lookup mapping using this derived column inside the lookup transformation..how shd i do this?
July 29th, 2011 4:27pm
you have to be more clear
Free Windows Admin Tool Kit Click here and download it now
July 29th, 2011 4:45pm
your question is not clear!
If you want to fetch null values as "Unknown" , so you can use a derived column transformation for this.
if you checked the "retain null values from the source as null values in data flow" in flat file source, then your derived column should be:
ISNULL([Input Column]) ? "Unknown" : [Input Column]
but if you unchecked the "retain null values from the source as null values in data flow" in flat file source ( which is default unchecked ) , then your derived column should be:
[Input Column]=="" ? "Unknown" : [Input Column]
so you simply can combine those two as this derived column expression:
(ISNULL([Input Column]) || [Input Column]=="") ? "Unknown" : [Input Column]
But I didn't understood next part of your question about lookup and merge join, did you used lookup to fetch values form reference tables? or you used merge join? what did you do exactly? or tell us what do you want to do exactly ? and then we can help you
better.
http://www.rad.pasfu.com
My Submitted sessions at sqlbits.com
July 30th, 2011 3:35pm


