|
|
Archives of the TeradataForum
Message Posted: Mon, 28 Apr 2003 @ 22:49:49 GMT
Subj: | | Why it is rounding the last digit? |
|
From: | | Ye, Mei |
Hi,
I was hoping for the 6th decimal is kept unchanged from source, but it seems it has been rounded up/down:
CREATE SET TABLE working_dev.STG_ACCOUNTS_TEST ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL
(
ID DECIMAL(18,0) NOT NULL,
AMOUNT decimal(18,6)
);
insert into working_dev.STG_ACCOUNTS_TEST (id, amount) values = (1,-123456789012.123456)
insert into working_dev.STG_ACCOUNTS_TEST (id, amount) values = (2,123456789012.123456)
insert into working_dev.STG_ACCOUNTS_TEST (id, amount) values = (3,12345678901.123456)
select * from working_dev.STG_ACCOUNTS_TEST;
ID AMOUNT
1 -123456789012.123460
2 123456789012.123460
3 12345678901.123455
How should we avoid such rounding?
Thanks,
mei
| |