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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.