title "Ablation Procedures by Site";
proc sql;
create table procedures as
select id,days_to_removal date,acceptancesitenumber,fyear,
case
when ep_diagnosticprocedureind = 'Y' as ep_study,
when ep_ablationprocedureind ='Y' and (ep_dp_simpleind ='Y' or ep_dp_standard_otherind ='Y')then 'Y' else 'N' end as ablations simple
from ccnrecs
where removalreasoncd='PS';
quit;
I would appreciate if someone can advise if the above is written technically accurately?
Have you tried to run it? What does the log say?
The syntax of your CASE statement isn't right. This version is but I have no idea if it is "correct". You will have to prove that for yourself by running it.
case
when ep_ablationprocedureind = 'Y' and (ep_dp_simpleind = 'Y' or ep_dp_standard_otherind = 'Y') then 'Y'
else 'N'
end
as ablations_simple
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.