proc sql; create table DAD_CABG as select CIHI_KEY, INST_NO, Gender, Age, POSTAL_CODE, PATIENT_LHIN, Residence_Code, ADM_DT, ADM_TM, Inst_From_NO, Facility_NO, FACILITY_LHIN, FACILITY_NAME,Adm_category, MCC, MCC_PARTITION,ACUTE_LENGTH_OF_STAY,TOTAL_LENGTH_OF_STAY,HIG_CODE,HIG_WEIGHT, Diag_code_01, Diag_code_02, Diag_code_03, Diag_code_04, Diag_code_05, Diag_code_06, Diag_code_07, Diag_code_08, Diag_code_09, Diag_code_10, Diag_code_11, Diag_code_12, Diag_code_13, Diag_code_14, Diag_code_15, Diag_code_16, Diag_code_17, Diag_code_18, Diag_code_19, Diag_code_20, Diag_code_21, Diag_code_22, Diag_code_23, Diag_code_24, Diag_code_25, Diag_type_01, Diag_type_02, Diag_type_03, Diag_type_04, Diag_type_05, Diag_type_06, Diag_type_07, Diag_type_08, Diag_type_09, Diag_type_10, Diag_type_11, Diag_type_12, Diag_type_13, Diag_type_14, Diag_type_15, Diag_type_16, Diag_type_17, Diag_type_18, Diag_type_19, Diag_type_20, Diag_type_21, Diag_type_22, Diag_type_23, Diag_type_24, Diag_type_25, Interv_code_01, Interv_code_02, Interv_code_03, Interv_code_04, Interv_code_05, Interv_code_06, Interv_code_07, Interv_code_08, Interv_code_09, Interv_code_10, Interv_code_11, Interv_code_12, Interv_code_13, Interv_code_14, Interv_code_15, Interv_code_16, Interv_code_17, Interv_code_18, Interv_code_19, Interv_code_20, INTERV_OOH_IND_01, INTERV_OOH_IND_02, INTERV_OOH_IND_03, INTERV_OOH_IND_04, INTERV_OOH_IND_05, INTERV_OOH_IND_06, INTERV_OOH_IND_07, INTERV_OOH_IND_08, INTERV_OOH_IND_09, INTERV_OOH_IND_10, INTERV_OOH_IND_11, INTERV_OOH_IND_12, INTERV_OOH_IND_13, INTERV_OOH_IND_14, INTERV_OOH_IND_15, INTERV_OOH_IND_16, INTERV_OOH_IND_17, INTERV_OOH_IND_18, INTERV_OOH_IND_19, INTERV_OOH_IND_20, Interv_status_attrib_01, Interv_status_attrib_02, Interv_status_attrib_03, Interv_status_attrib_04, Interv_status_attrib_05, Interv_status_attrib_06, Interv_status_attrib_07, Interv_status_attrib_08, Interv_status_attrib_09, Interv_status_attrib_10, Interv_status_attrib_11, Interv_status_attrib_12, Interv_status_attrib_13, Interv_status_attrib_14, Interv_status_attrib_15, Interv_status_attrib_16, Interv_status_attrib_17, Interv_status_attrib_18, Interv_status_attrib_19, Interv_status_attrib_20, HCNE from DAD.DAD1617 where PROVINCE_ISSUING_HCN='ON' and RESPONSIBILITY_FOR_PAYMENT='01' and HCN_INDEX='H' and AGE >=18 and INTERV_CODE_01 in ('1IJ76DAXX', '1IJ76LAXX', '1IJ76LAXXA', '1IJ76LAXXG','1IJ76LAXXN','1IJ76LAXXQ'); quit; How would I modify the above code to select cases such that the bold highlighted above are present in either of the 19 variables interv_code_02 to interv_code_20 and not in interv_code_01
... View more