BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mauri0623
Quartz | Level 8

I have the following file that is consists of only 3 records. I made a sas dataset form this file. I list the file and then the code.

1005316134100667496628JAN2019:17:47:49792752
1005938763100631605508FEB2019:19:51:03785599
1006029597100602953903MAR2019:15:17:37802690

Now the code.

%let pidin = /saswrk0/scp/inbox/;
%let filename = PID.00.2019030813093725.00000000;

data pids;
infile "&pidin.&&filename." lrecl=44;
input
prev_ptnt_id $10.
curr_ptnt_id $10.
chg_eff_tmstmp $18.
dw_ld_run_id 6.
;
run;

Now I want to insert the pids dataset into an oracle table to update the table with the 3 records. The problem is that chg_eff_tmstmp in the oracle is datetime20. Since the variable between the two are not compatible no insert is taking place.

1 ACCEPTED SOLUTION

Accepted Solutions
mauri0623
Quartz | Level 8

I did and it works. Sometimes someone has to give you a hint. Thank you and have a great weekend.

View solution in original post

2 REPLIES 2
ballardw
Super User

If you want a datetime value why did you read the timestamp as chg_eff_tmstmp $18.

use datetime18. for the informat.

 

 

mauri0623
Quartz | Level 8

I did and it works. Sometimes someone has to give you a hint. Thank you and have a great weekend.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 742 views
  • 0 likes
  • 2 in conversation