Page 1 of 1

Range Lookup not returning correct values.

Posted: Fri Jul 10, 2015 10:26 pm
by gayathrisivakumar
Hi All,

I have a requirement to do a range look up based on some reference values. The field from source is of type Char and values which I need to do a range look up (reference values) are of Varchar type.

I tried to do a range lookup and its not returning any values. The output of range lookup goes to one field and if nothing matches output would be null.

Will different data types cause an issue? Other than lookup, is there any other way to achieve it?

thanks

Re: Range Lookup not returning correct values.

Posted: Fri Jul 10, 2015 11:26 pm
by gayathrisivakumar
It would be great if someone can help me with a solution.

Thanks

Posted: Fri Jul 10, 2015 11:31 pm
by chulett
Almost midnight here on a Friday night and you waiting all of an hour before ringing the doorbell again. It would be great if someone had a little patience.

Posted: Fri Jul 10, 2015 11:37 pm
by gayathrisivakumar
But I guess DSxchange users are not only from US :lol:

Posted: Sat Jul 11, 2015 5:46 am
by priyadarshikunal
Char and Varchar will have different Hash Value and may fall in to different partition.

PS : Although not all posters are from US, you hardly waited for an hour and decided to demand answer again. This is all volunteer site and people post when ever they have time and it will not make a difference if you re-post every hour. If you have situation to get answer in time bound manner, purchase similar support from Official Support Provider i.e. IBM.

Posted: Sat Jul 11, 2015 8:34 am
by chulett
gayathrisivakumar wrote:But I guess DSxchange users are not only from US :lol:
Of course not and not my point, just my situation. I was up working on a production problem (my job job) when I decided to check the site (my volunteer 'job') and would have been happy to help except for the lack of patience.

Posted: Sat Jul 11, 2015 3:24 pm
by ray.wurlod
gayathrisivakumar wrote:But I guess DSxchange users are not only from US
It was the weekend in most of the rest of the world.

Posted: Sun Jul 12, 2015 9:38 pm
by ray.wurlod
Your Char types are probably padded; you need to remove the pad characters before lookup will be successful with (unpadded) VarChar types.

Preferred technique is to use a Modify or Transformer stage to effect the trim operation. You need to be aware of the pad character that is being used in your database and/or in DataStage if that's where they are being padded. In the latter case it's defined through the APT_STRING_PADCHAR environment variable.