|
FWiW, that expression is only sufficient to determine which... and you forgot that sometimes decimal dots and/or decimal
character field values do not represent valid _positive_
integers; i.e. valid character representation of negative
integer values would be selected by that predicate. If the
character field includes a left-negative sign for a valid
integer value, the [implicit] cast to numeric would occur
without error.
commas could be used, and a plus or minus sign could be used on
the right or left hand, instead of a minus sign the numeric value
can be enclosed within parenthesis. Sometimes also a dot or a
comma is used to separate the digits on the left hand of the
decimal comma/dot (for example 1.234.567,89 or 1,234,567.89).
You'll see all those presentations in the same column/field if
you get an SAP interface (at least I saw it in that one I got).
... and that's why I have an RPG function that checks all those
representations. An other RPG function converts the checked
values into a numeric value. Both functions are registered as
UDFs and used in SQL.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.