BookmarkSubscribeRSS Feed
Ranjeeta
Pyrite | Level 9

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?

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

Have you tried to run it? What does the log say?

Ranjeeta
Pyrite | Level 9
Im waiting for an actual connection to the server to get the data ..just writing the query to make sure I have it ready when I get the data so wanted to ensure its correct
SASKiwi
PROC Star

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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 508 views
  • 0 likes
  • 3 in conversation