BookmarkSubscribeRSS Feed
Jim_Ogilvie
Obsidian | Level 7

Hello,

 

I am running some ETL routines against an Oracle database via SAS ACCESS ODBC, using PROC SQL.

 

There is a datetime field in the source table that contains some invalid values (8 of then according to the log) and I would like to view these in order to provide feedback to the users and get them fixed.

 

Code:

proc sql;  
   create table test2 as
   select myDateField as dates 
   from myTableView
   order by dates;
quit;  

 

I see the following log note:

The data value for column DATES (DATES) was truncated or was out of range 8 times when

retrieving that data from the DBMS.
 
I have tried using the "Put" function, but this also gives an error.
 
Thansk in advance
 
Jim
1 REPLY 1
ballardw
Super User

You will likely have to use a different way to look at that variable as I am pretty sure the resulting SAS data set would have those values missing.

 

I would select information that identifies the record other than the date, then use a pass through query to create a report from the Oracle data base that should allow you to "see" the resulting date field.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 540 views
  • 0 likes
  • 2 in conversation