Hi All,
I know this is a simple question. However I hear different answers from different people and I dont know whats the truth.
Consider the following scenario in a PX job.
Job reads field A(char 6) from table X. In a lookup stage input link it is reading fields B & C where C is of VARCHAR 120 and B is the integer key. For the lookup to happen properly do we have to cast the field C to VARCHAR 6 after trimming when we do the read from the lookup table before it reaches the lookup stage?
Thanks!
Chanaka
Question on PX lookup
Moderators: chulett, rschirm, roy
Question on PX lookup
Chanaka Wagoda
Re: Question on PX lookup
Its not required to trim varchar columns. In case, if column C has CHAR datatype, then trimming is required
Whenever using the lookup, its better to use trim function and do lookup on the same datatype.... We faced a problem recently using lookup ... Our source is char(1) and lookup is varchar(1).... when is the number or character, lookup is successful and when there is a space in the source and there is match for space in the lookup also but lookup failed... when we used cast function and changed the datatype char to varchar at the source... then lookup was success...