Steve Baldwin wrote: > Thanks again Waldemar. If I'm understanding you correctly, won't > your suggestion cause the decimal character to be set to '.', and the > group separator character set to a space ? Overriding the > NLS_Numeric_Characters may help in returning numbers as Perl numbers, > but then TO_CHAR, using the G and D format mask characters, won't > return a correctly (i.e. Locale-specific) formatted number. I need > to do both. > > In other words, for formatted numbers, I must have the Group > separator and Decimal character correctly set as per the Locale. > However, when I am retrieving unformatted numeric values in the same > statement, the Locale's Decimal character is automagically used (by > DBI ?), which causes Perl to object if I subsequently use the > returned value in a numeric expression. I would have expected > DBD::Oracle to always return a number as a number, regardless of any > Locale setting.
Could be useful to have a setting to bind and return numbers as numbers, not formatted strings. >From a quick glance at the source it appears to me that numbers are always retrieved as VARCHAR2. There's a datatype parameter to bind_param, but what about bind_col? Not sure how you'd specify that. But I can see the argument for binding as strings in some cases; since Oracle supports precisions and scales beyond that representable by int/float/double, you would only be able to access a subset of Oracle numbers. Would have thought that at least the majority of usage will have numbers restricted to that of C datatypes, since the database will be getting that data from external sources. -- Andy Hassall ([EMAIL PROTECTED]) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
