Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: No clear answer from Oracle

by gam3 (Curate)
on Apr 15, 2005 at 21:17 UTC ( [id://448345]=note: print w/replies, xml ) Need Help??


in reply to No clear answer from Oracle

From DBD::Oracle

A slightly more subtle problem can occur with NUMBER types. The default NLS settings might format numbers with a fullstop (".") to separate thousands and a comma (",") as the decimal point. Perl will generate warnings and use incorrect values when numbers, returned and formatted as strings in this way by Oracle, are used in a numeric context. You could explicitly convert each numeric value using the TO_CHAR(...) function but that gets tedious very quickly. The best fix is to change the NLS settings. That can be done for an individual connection with the code below.

$dbh->do("ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '.,'");
-- gam3
A picture is worth a thousand words, but takes 200K.

Replies are listed 'Best First'.
Re^2: No clear answer from Oracle
by wazoox (Prior) on Apr 15, 2005 at 21:35 UTC
    Thank you. Actually I read quite a lot of this doc (may CLOB burn in hell for ever) but I missed this part :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://448345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-26 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found