BookmarkSubscribeRSS Feed
boin
Obsidian | Level 7

%Let DateToGet = %sysfunc(intnx(day,%sysfunc(today()),-45),yymmdd10.);
%let DateToGet1 =  %str(%'&DateToGet%');
%put &DateToGet1;

%Let DateToGet2 = %sysfunc(today(),yymmdd10.);
%let DateToGet3 =  %str(%'&DateToGet2%');
%put &DateToGet3;

proc sql;
connect to teradata as myconn (
   user="XXXXX@LDAP"
   password=XXXXXXXX 
    SERVER=XXXXX.XXX.com.
    DATABASE=DATA_PRESS_40);
create table  proff_2 as 
SELECT *
FROM connection to myconn (
SELECT Bil_cnt_
FROM DATA_PRESS_40.Pa_til_DY
WHERE ing_tem_Ne in ('FLB'  'MA') and
Pro_esc in ( 'ls' 'Naing'  'ion'  'ion 0-29') and
Bill_Date >  &DateToGet1 and Bill_Date < &DateToGet3;
ORDER BY Bil_cnt_);
quit;

I am trying the above code , and I keep getting an error message:

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

Please assist..

4 REPLIES 4
LinusH
Tourmaline | Level 20

The obvious counter question is what are the data types/lengths in your query?

SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Fifth Edition

"SAS/ACCESS 9 does not support these Teradata data types: GRAPHIC, VARGRAPHIC, and LONG VARGRAPHIC"1

Data never sleeps
Tom
Super User Tom
Super User

Since you are only selecting one column you know which one has an invalid type.

Try telling Teradata to cast it into a float for SAS.


SELECT cast(Bil_cnt_ as float) as Bil_cnt_


jakarman
Barite | Level 11

review the sql paas through specifics of TD. SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Fifth Edition is using the execute approach.  This will cause a full isolation of SAS and TD.

Your TD DBA is probably having defined a non supported one  SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Fifth Edition

What you are doing is running the Query in TD and getting those results back to SAS.
If that is intended (network load) that is as it is.  You could have support with in-database procedures and own working storage at the TD site. 

---->-- ja karman --<-----
john6655
Calcite | Level 5

I also faced the same problem as you when I tried this type of code. You can visit rocketmail tech support to solve the problem. The various kind of solutions available related to the problem which will help you to solve the problem.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 15321 views
  • 6 likes
  • 5 in conversation