Hi, Am learning the proc sql with case and where is my code. I want to generate multiple variable (MRI, BIOP & MRI_BIOP) if the condition is true but this is not giving me the expected results. Am help? proc sql; create table want as select *, case when HCPCS_CD= '55700' | '55705' then 1 else 0 end as BIOP, case when HCPCS_CD= '77021' then 1 else 0 end as MRI_BIOP , case when HCPCS_CD in ('72195', '72196', '72197', '76376', '76377', '76498', '72148', '72146', '72198', '8895', '8896', 'B43', 'B53', 'BW3') then 1 else 0 end as MRI from diag_out; quit;
... View more