BookmarkSubscribeRSS Feed
LearnByMistk
Obsidian | Level 7

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

 condition

 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;

 error:Datatype 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;

2 REPLIES 2
LinusH
Tourmaline | Level 20

Assuming that you already have read this:

http://support.sas.com/documentation/cdl/en/acreldb/69580/HTML/default/viewer.htm#n0v7nh4ylrihtin1te...

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
LearnByMistk
Obsidian | Level 7

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;

 quit;

 

could you help me how to get this thing into SAS

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 846 views
  • 0 likes
  • 2 in conversation