On 2009-01-27 15:21:55 +0000, Martin Evans wrote:
> I'm working with DBD::Oracle at the moment and getting a little frustrated 
> with 
> integer numbers. I'd like my database returned integers to look like integers 
> to Perl but they currently don't until I add 0 to them. Here is the problem:

I think this is on purpose. Oracle numbers have a huge precision (38
decimal digits), so in general you cannot convert them to a perl number
without losing precision. DBD::Oracle could be smart enough to recognize
the safe cases (integers with at most 9 (32 bit) resp. 18 (64 bit)
digits), but AFAIK it isn't. Your best bet is probably explicitely
binding with an approriate type (SQL_INTEGER).

        hp

-- 
   _  | Peter J. Holzer    | Am Anfang war der Bug und der
|_|_) | Sysadmin WSR       | Verantwortliche sprach:
| |   | [email protected]      | Es werde ein Testcase.
__/   | http://www.hjp.at/ |    -- Clemens Zauner in dcii

Attachment: pgpM9Rtp1M19j.pgp
Description: PGP signature

Reply via email to