BookmarkSubscribeRSS Feed
srisai
Calcite | Level 5
Hi All,

Here am facing an error while extracting the data from Teradata to SAS by using SQL pass through facility in SAS?EG.

ERROR: At least one of the columns in this DBMS table has a datatype that is not supported by this engine.

what could be the reason?
Please advice?
7 REPLIES 7
srisai
Calcite | Level 5
Hi,

I got resolved this issue.

Thanks,
Kavi
RedPlanet
Obsidian | Level 7

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
Calcite | Level 5
Hi srisai,

Can we do this convertion using implicit libname and in Data Step.?

(I am facing the same issue while reading the data from Teradata and many columns getting dropped.)
Kurt_Bremser
Super User

@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).

mma
Calcite | Level 5 mma
Calcite | Level 5

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

PrakashAdhav1
Calcite | Level 5
Hi,

Can we do this convertion using implicit libname and in Data Step. and read the data from Teradata ?

(I am facing the same issue while reading the data from Teradata and many columns getting dropped.)
LinusH
Tourmaline | Level 20
I think that this is explained in many threads.
You need to either
- use explicit SQL pass through
- have a view created in TD that either omits or casts columns w unsupported data types
Data never sleeps

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 4590 views
  • 0 likes
  • 6 in conversation