Range Lookup not returning correct values.
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 60
- Joined: Thu Dec 17, 2009 1:36 am
Range Lookup not returning correct values.
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
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
-
- Premium Member
- Posts: 60
- Joined: Thu Dec 17, 2009 1:36 am
Re: Range Lookup not returning correct values.
It would be great if someone can help me with a solution.
Thanks
Thanks
-
- Premium Member
- Posts: 60
- Joined: Thu Dec 17, 2009 1:36 am
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
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.
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.
Genius may have its limitations, but stupidity is not thus handicapped.
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.gayathrisivakumar wrote:But I guess DSxchange users are not only from US
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.