Hi All,
I have a column value in Teradata which is -999999999992240155, while the corresponding value in SAS is -999999999992240128.
Any insights why the values are different?
BTW, the data type in Teradata is decimal(18,0), the data type in SAS is numeric and format=19.
Thank you!
Jade
Usually, when one encounters numbers with that many digits, they are not actual numbers, but some kind of code, in which case they should be kept in strings (character).
Keep in mind that the 15 digits of SAS can store the GNP of the US down to dimes, so that's sufficient for statistics.
All numbers in SAS dataset are stored in 8 bytes, real format (mantissa + exponent). Or less, if the length is reduced with a length statement.
That means that SAS can reliably store around 15 decimal digits. Any further digits will be lost or changed.
For further information, google for "sas numerical precision".
Thank you so much KurtBremser! So the value -999999999992240155 is out of the valid range of SAS, right?
Is there any work around to deal with this situation? Or there is nothing we can do with it?
Thanks,
Jade
Usually, when one encounters numbers with that many digits, they are not actual numbers, but some kind of code, in which case they should be kept in strings (character).
Keep in mind that the 15 digits of SAS can store the GNP of the US down to dimes, so that's sufficient for statistics.
Thank you!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.