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.
I did and it works. Sometimes someone has to give you a hint. Thank you and have a great weekend.
If you want a datetime value why did you read the timestamp as chg_eff_tmstmp $18.
use datetime18. for the informat.
I did and it works. Sometimes someone has to give you a hint. Thank you and have a great weekend.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.