SAS/Access to Teradata does not support BIGINT data, and it is usually the offending data type. However, other data types are supported but still may cause data truncation and errors. For example, DECIMAL(38,15) is supported by SAS/Access, but it has an invalid SAS format, so it creates a runtime format error in SAS.
An easy way to find BIGINT or other unsupported data is to do a Proc Contents on the table using the libname access method. The erroneous columns will be in the SAS log. You can also look in the listing for DECIMAL values where they are longer than 15 digits -- you may want to query the max and min for those columns before you cast them to something that SAS can read.
SAS only represent 15 digits with exact precision in 64-bit operating systems. You need to cast those bigger decimal types as DECIMAL(15) if they are in bounds, or CHARACTER(20) (or larger) if they are not. Note that character keys are discouraged because they are slow to access in joins and they take up more space.
@PrakashAdhav1 wrote:
Hi srisai,
Can we do this convertion using implicit libname and in Data Step.?
No. You either need to do it in explicit pass-through or have a view created in Teradata (which you can also do in explicit pass-through).
Hello Kavi,
I'm facing the same issue and i wanted to ask you how did you solve it? I'm doing a query over a table that has one column not supported and even if i'm not selecting it, it's giving me this error.
Thanks in advance!
Regards,
Mónica
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.