in reply to Re^2: Regex for max length float
in thread Regex for max length float

I'm confused. You say:

precision - total number of digits
scale - digits on the rhs

but in you OP, you say that:

with a precision of 4 and a scale of 3 (...) 12.3 is not valid

Why not? Its total number of digits (3) is less than 'precision', and there is only one digiit on the rhs...

Replies are listed 'Best First'.
Re^4: Regex for max length float
by agianni (Hermit) on Mar 14, 2007 at 19:58 UTC
    This isn't really a Perl issue, but to clarify, in Oracle data types, precision defines the total number of digits and the scale defines the number of those digits that occur on the right side of the decimal. Thus, the number of possible digits on the left side of the decimal are $precision - $scale while the number of possible digits on the right hand side are $scale.
Re^4: Regex for max length float
by jeanluca (Deacon) on Mar 14, 2007 at 19:34 UTC
    When using MySQL your 12.3 would be translated to 12.300, because the scale is 3, which is not valid( mysql numeric types)