Lookup value 0
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 41
- Joined: Tue Jan 24, 2006 3:43 pm
- Location: United States
- Contact:
Lookup value 0
What does a resulting value of 0 mean when we do a lookup?
I have an Underwriter_id(char 10) in Source. User_id(carchar 10) in lookup table. The data types are different. But the lookup is failing. But if I do it from the database then the match is there. So if the lookup action is drop then the record is dropped. If it is continue then the peek stage shows the value as 0000000000. So wondering how to do this. I have used UpCase(TrimB(User_Id)) for lookup and respectively for the Underwriter_id too but still getting this error. Is this a problem because of the datatype? Just mind boggling.
I have an Underwriter_id(char 10) in Source. User_id(carchar 10) in lookup table. The data types are different. But the lookup is failing. But if I do it from the database then the match is there. So if the lookup action is drop then the record is dropped. If it is continue then the peek stage shows the value as 0000000000. So wondering how to do this. I have used UpCase(TrimB(User_Id)) for lookup and respectively for the Underwriter_id too but still getting this error. Is this a problem because of the datatype? Just mind boggling.
Knowledge is Power
A char 10 will be of length 10 padded with whatever you padchar is set to (seemingly 0...) so unless your are actually comparing 10 against 10, you're unlikely to get the match, you will need to convert to varchar with trimming pad character or convert the varchar to char 10 (former sounds preferable)
-
- Premium Member
- Posts: 41
- Joined: Tue Jan 24, 2006 3:43 pm
- Location: United States
- Contact:
-
- Premium Member
- Posts: 41
- Joined: Tue Jan 24, 2006 3:43 pm
- Location: United States
- Contact:
What have you set the APT_PADCHAR to?
Easiest start will probably be to send your lookup to a peek, maybe with a transform in the middle to surround the value in braces or convert the field to hex. I can't say what your data looks like so can't recommend a solution but clearly one side is not the same as the other.
Easiest start will probably be to send your lookup to a peek, maybe with a transform in the middle to surround the value in braces or convert the field to hex. I can't say what your data looks like so can't recommend a solution but clearly one side is not the same as the other.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Lookup value 0
If your source and lookup data is from table, then you can do type cast the data to common data without affecting the value of the data, before it do the lookup.
DS User
DS User
-
- Premium Member
- Posts: 41
- Joined: Tue Jan 24, 2006 3:43 pm
- Location: United States
- Contact:
-
- Premium Member
- Posts: 41
- Joined: Tue Jan 24, 2006 3:43 pm
- Location: United States
- Contact: