Handling NUMERIC(18) as string?

From: Dennis Breithaupt (d.breithaupt_at_pelion12.de)
Date: 06/16/04


Date: Wed, 16 Jun 2004 13:07:09 +0200
To: dbi-users@perl.org

Hy folks,

I request your help for the following problem:

I'm converting a database from a very old Sybase DBMS to a current
postgresql by selecting data from the first and inserting it into the
other with a perl script using the dbi-interface.

(few tables with few columns, but few hunderthousends of tuples)

There are large NUMERIC-fields in the db.

My problem ist, that when fetching the data (using the
bind_columns-method) and then building the INSERT-string the "number"
gets rewritten to scientific-notation. Of course I don't want that, but
want the exact value, I've fed into the variable.

How can I enforce, reading the "number" from the NUMERIC-field as a string?

regards,

Dennis Breithaupt