Page 1 of 1

Lookup comparisions

Posted: Mon Dec 19, 2011 2:43 pm
by e1994264
Hi,
I have one issue.
My source is a flat file. My lookup is Db2 database.
i have Source column which is Char datatype with 9 chars.
But my lookup up table column is Varchar data type with 15 in length.
My question is how can i trim the spaces and lookup based on the condition.

As far as in server jobs you can write Trim function in while joing the columns, But in Parallel job how should i do get perfect match values.
Please can you share you ideas ASAP

Posted: Mon Dec 19, 2011 3:01 pm
by jwiles
You can call Trim and many other functions in the transformer stage (quick search of <a href="http://publib.boulder.ibm.com/infocente ... p">product documentation</a> will point you towards them).

The data types of your keys should match when performing a lookup, so convert both to the same varchar or char specification out of the transformer.

Regards,

Posted: Mon Dec 19, 2011 3:13 pm
by ray.wurlod
Why ASAP?

We don't do "urgent". DSXchange is an all volunteer forum whose members post if, as and when they can.

Search DSXchange for examples of how to pad strings and of how to convert from fixed-length string to variable-length string. However you accomplish it, your values (with trailing spaces if they have them) must match.