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!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.