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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 17388 views
  • 6 likes
  • 5 in conversation