Hi all.
How can I test for a number stored Char field?
I need to locate records which have numeric values stored in a field where the value is less than 1000000. That field also contains alpha-numeric values as well. The field's data type is Char(1Cool and I'm sending the output to a Seq file.
I have coded NUM(Trim(in.FldName)) = 1 And Trim(in.FldName) < '1000000' as a transform stage constraint. I also coded NUM(Trim(in.FldName)) = 1 And StringToDecimal(Trim(in.FldName)) < 1000000. The output is very inconstant, e.g., output records with values > '1000000' and records with < '1000000' are missed.
How should this type of test be coded?
Thanks in advance for any help.
Testing for a numbers stored Char 18 field
Moderators: chulett, rschirm, roy
The field's data type is Char(1Cool? Disable 'Smilies' in your post.
Both Num() and IsValid() can be used to check for a number, depending on your need. And you need a numeric comparison, doing it string-wise a value of '1000000' is less than '90' for example.
Both Num() and IsValid() can be used to check for a number, depending on your need. And you need a numeric comparison, doing it string-wise a value of '1000000' is less than '90' for example.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers