BookmarkSubscribeRSS Feed
sas_null_
Calcite | Level 5

Need help appending SAS data set into an oracle table. I'm having issues with regards to the date as the SAS data  dates gets converted to either December 31, 1959 or Jan 1, 1960 in the oracle table. For instance, I have a date 01/23/1999 in SAS but it gets converted to 01-Jan-1960 in oracle using the append process below

proc append base= ORCL.base

data=SAS.data; run;

oracle base table has Process_date and SAS date has the same field.

Note: When I did a direct load of SAS.data into a new table in Oracle using SAS/access to oracle, I noticed (connecting to oracle using SAS and using proc content) that the length format of the Process date changed to 8 from 4 (process date length =4) but results where fine except that the process_date was in a date timestamp format

Any help/suggestion is welcomed

Thanks

3 REPLIES 3
Reeza
Super User

I believe oracle is expecting a DATETIME variable, not a DATE variable. Convert your date to date time instead for uploading.

sas_null_
Calcite | Level 5

I tried that approach by changing the SAS format from the SAS data set to reflect that of the Oracle; but still ended up with the same result. Maybe you can provide me with examples that I can try and see if your recommended approach will work. Thanks

Reeza
Super User

This is an old question/problem:

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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