DATA Step, Macro, Functions and more

datatype teradata to sas

Posts: 29

datatype teradata to sas

how to convert teradata timestamp while culling data in to sas using proc sql:


 suppose in TD we have table T1


columns id number (20,0)

              dt timestamp(0)


while culling this data in sas  as

 proc sql;

 create table mylib.t1 as

 select id,dt from td.T1;quit;

 errorSmiley Very Happyatatype not supported by this engine



have used  below step also but it's not working


proc sql;

 create table mylib.t1 as

 select id

,dt format =datetime21.  from td.T1;quit;

Super User
Posts: 5,881

Re: datatype teradata to sas

Posted in reply to LearnByMistk

Assuming that you already have read this:

TMESTAMP(0) is supported as DATETIME19. in SAS.

If you have a time zone on the column, it will be read as CHAR in SAS. Perhaps this is the case?

Data never sleeps
Posts: 29

Re: datatype teradata to sas

Hi ,

Thanks for infoo ,I have read that post but my issue still remains the same 


column datatype in teradata is timestamp(0) and when i tried to cull data from TD to sas via pass through sql as 

 proc sql;

 connect to teradata (user=&user password=&pwd mode=teradata);

create table mysas.data1 as

select * from connection to teradata(


/**********approaches i used so far****/  

select employee_id , registration_date format =timestamp19.); fail

select employee_id , cast(registration_date as mm-dd-yyyy hh:mm:ss.); fail

 disconnect to teradata;



could you help me how to get this thing into SAS

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation