Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Issue with Number data type in Teradata 14.0 - forum topic by gsuresh1802

$
0
0

I am migrating a table from Oracle to TD 14.0 and using it for further transformations.
After migrating it to TD, I have ran minus on both TD & Oracle table data (which is copied TD by some third party tool).
Query:
Select col1 from table 1 minus select col1 from table 2;
Output:
0.00
Data type col1 table1 is - Number(in TD) & col1 in table 2 number(10,4) (as per Oracle - in TD)
but when I manually check the result both are same and when I have applied with trim then it works fine (no records shown in minus).
Select trim(col1) from table 1 minus select trim(col1) from table 2;
How does trim make difference here ?
I know number datatype is TD ia variable in length and adjust its precision as per the data. Even thought it shows only 2 decimal points in precision in select but internally it stores the complete precision, when u cast it you will get all the precision.
And I have replaced NUMBER data type with DECIMAL then it works fine, only problem is with NUMBER( I need to apply trim to compare the resultset)
Please help me out

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>