Range Lookup not returning correct values.

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
gayathrisivakumar
Premium Member
Premium Member
Posts: 60
Joined: Thu Dec 17, 2009 1:36 am

Range Lookup not returning correct values.

Post 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
gayathrisivakumar
Premium Member
Premium Member
Posts: 60
Joined: Thu Dec 17, 2009 1:36 am

Re: Range Lookup not returning correct values.

Post by gayathrisivakumar »

It would be great if someone can help me with a solution.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
gayathrisivakumar
Premium Member
Premium Member
Posts: 60
Joined: Thu Dec 17, 2009 1:36 am

Post by gayathrisivakumar »

But I guess DSxchange users are not only from US :lol:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply