dbexport/dbimport problem
Posted in 1999
Topics: Migration, Import/Export & Data Conversion
Hi all,
I have Informix Online Dynamic Server 7.23 UC6 for SCO OpenServer.
When I do dbexport/dbimport money values are truncated to 2 decimal
positions. Do you know why?
Any help would be appreciated.
GQG wrote:
> I have Informix Online Dynamic Server 7.23 UC6 for SCO OpenServer.
>
> When I do dbexport/dbimport money values are truncated to 2 decimal
> positions. Do you know why?
Probably a bug. Are you dealing with Kuwaiti currency (1000 fils to
the dinar), or with stock prices and the like (21/32 needs more than
2 dp, boo hiss to the US stock exchanges for not having gone decimal!)
Although the default precision for MONEY(x) is 2 dp, not all MONEY
values are constrained to use 2 dp. If you can produce a simple
test case which demonstrates the problem, then you can report the
bug -- I think.
CREATE DATABASE MoneyBug;
CREATE TABLE MoneyBug(Value MONEY(6,3) NOT NULL);
INSERT INTO MoneyBug VALUES(1.234);
Now dbexport the MoneyBug database. Demonstrate that the unloaded
data contains 1.23 and you're home. To be of more interest, include
the alternative value 9.876 and note whether that appears as 9.87 or
9.88 (truncation or rounding).
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>