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. Steve -----Original Message----- From: Waldemar ¯urowski [mailto:[EMAIL PROTECTED] Sent: Tuesday, 12 August 2003 12:19 PM To: Steve Baldwin Subject: RE: DBD::Oracle - NLS and numbers W liście z wto, 12-08-2003, godz. 16:37, Steve Baldwin pisze: > Thanks for the response Waldemar. Actually, the reason I do the ALTER > SESSION is so that TO_CHAR formats correctly using the 'G' and 'D' > format mask characters. So, if I have a statement like Yes, I understood what you need at the first time. > SELECT some_number, TO_CHAR(some_number, '999G999G999D999') FROM > some_table > > I'm screwed because while the TO_CHAR format's correctly, the raw > number (i.e. the 1st column in the select list) comes back with commas > in it. This is because in Germany (well - in Poland too), 'decimal character' is comma, not a dot. And change of 'territory' to Germany changes 'decimal character' as well. > Any other suggestions ? No. Just try: $dbh->do(q{ALTER SESSION SET NLS_TERRITORY='GERMANY'}); $dbh->do(q{ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '. '}); Second line will restore a dot as 'decimal character', which is what you want. Best regards, Waldemar
