Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 28 Apr 2003 @ 22:49:49 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


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



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016