I have a input field coming all char data types and when i do a lookup against char datatype fields the lookup is failing becoz the values are coming along with spaces.
ex. char (3) input field - "30" when i do a look up for this field the data is getting rejected and the if i see the data in reject file it shows "30 "
I have tried using trim/stripwhitespaces/trimleadingand trailing.
I have the $APT_STRING_PADCHAR to 0x20 .
Not sure what is the problem..all the datatype as char fields....please help me out....
That's how CHAR fields work, they are always padded to their full length and that typically with spaces (0x20). Is your lookup field a CHAR(3) as well or a different size CHAR?
-craig
"You can never have too many knives" -- Logan Nine Fingers
I have one more requirement ...is to pass a null field to validate a field.
So as mentioned in the previous issue if i passing field1 it is give as "30 " and for the requirement 2 if i pass null value in i/p it is taking as whitespace...not sure whats wrong with it.....
Can you let me know if there is a way to lookup vchar input field to char field in database.
Then your lookup either isn't a CHAR(3) or perhaps the padding character was different when created. You might be able to solve this by simply calling your input field a VARCHAR(3) instead.
-craig
"You can never have too many knives" -- Logan Nine Fingers