All Forums Database
khatriprad 12 posts Joined 12/10
08 Feb 2015
Long decimal Value is getting round-off

Values are getting round-off while inserting long decimals in the table

 

Please check the example below

 

DROP table a_test

create table a_test(id decimal(18,0));

 

INSERT INTO a_test(999999000028677971 (decimal(18,0)))

 

sel * from a_test

 

 id                 

 ------------------ 

 999999000028678020 

 

 

sel type(999999000028677971)

 

 Type(999999000028677971.)    

 ---------------------------- 

 DECIMAL(18,0)     

 

 

Teradata Version : 14.10

 

Could you please suggest why this happening

 

Thanks,

Pradeep

Pradeep
Tags:
Priya01 10 posts Joined 08/14
09 Feb 2015

Hi Pradeep,
I do not see any round off happening. Using the same terdata version (14.10.04.04).
Check if its rounding off in the sql assistant or the tool which you are using.
 
Here is the output when I tried the same:-
 
BTEQ -- Enter your SQL request or BTEQ command:
create table a_test(id decimal(18,0));

create table a_test(id decimal(18,0));

 *** Table has been created.
 *** Total elapsed time was 1 second.

 BTEQ -- Enter your SQL request or BTEQ command:
INSERT INTO a_test(999999000028677971 (decimal(18,0)));

INSERT INTO a_test(999999000028677971 (decimal(18,0)));

 *** Insert completed. One row added.
 *** Total elapsed time was 1 second.

 BTEQ -- Enter your SQL request or BTEQ command:
sel * from a_test;

sel * from a_test;

 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.

                  id
--------------------
 999999000028677971.
 
 
Hope this helps.
 
Thanks,
Priya

MaximeV 19 posts Joined 11/13
09 Feb 2015

hi,
check this parameter :
http://www.info.teradata.com/htmlpubs/DB_TTU_14_10/index.html#page/Utilities/B035_1102_112A/DBScontrol.31.0939.html

khatriprad 12 posts Joined 12/10
09 Feb 2015

Thanks Priya.....this seems to happening due to client issue

Pradeep

You must sign in to leave a comment.