BookmarkSubscribeRSS Feed
Rodcjones
Obsidian | Level 7

Within SAS EG, I am appending data from multiple datasets in WORK to various SQL database tables in the PBIDATA library. I am able to append all data without problems except for one. I get this error

 

NOTE: Appending WORK.SEPSIS to PBIDATA.CEI_SepsisCCG.
NOTE: There were 1 observations read from the data set WORK.SEPSIS.
NOTE: 0 observations added.
NOTE: The data set PBIDATA.CEI_SepsisCCG has . observations and 69 variables.
ERROR: CLI execute error: [Microsoft][ODBC SQL Server Driver]Datetime field overflow
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE APPEND used (Total process time):
real time 0.07 seconds
cpu time 0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.

 

after submitting this code:


proc append data=sepsis
base=PBIDATA.CEI_SepsisCCG force;run;

 

I have read up on this error and confirmed none of my datetime variables have dates earlier than the year 2015.

I also confirmed that all datetime variables in the WORK dataset have a format of DATETIME22.3 and that all datetime variables in the PBIDATA dataset also have a format of DATETIME22.3. One difference -and I'm grasping at straws here - is that some INFORMAT values on the WORK dataset are null (rather than matching the format value of DATETIME22.3).

 

To reitetrate, I have no problems appending other WORK datasets to other PBIDATA datasets, and those tables also include datetime variables. I am wondering if the community has any ideas on what other aspects could be investigated as the cause.

1 REPLY 1
Kurt_Bremser
Super User

Keep in mind that Microsoft uses an internal format for times that is different from SAS. In SAS, times are counts of seconds, in MS software, they are fractions of a day (12:00:00 is equal to 0.5).

This might be the cause of your problem.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 696 views
  • 1 like
  • 2 in conversation