I wrote the following hard coded CASE statment in in PROC SQL: /*Notes is the memo field */ MAX(CASE WHEN FIND (Notes, ' burn', "i")>0 /*exclusion for valid return */ AND FIND(Notes, 'burner', "i")=0 AND FIND(Notes, 'burn off', "i")=0 AND FIND(Notes, 'burnt', "i")=0 AND FIND(Notes, 'unit rely', "i")=0 AND FIND(Notes, 'burney', "i")=0 AND FIND(Notes, 'burnage', "i")=0 AND FIND(Notes, 'nnon bur', "i")=0 AND FIND(Notes, 'burnssd', "i")=0 AND FIND(Notes, 'wave', "i")=0 AND FIND(Notes, 'burns/', "i")=0 AND FIND(Notes, 'burn mark', "i")=0 AND Notes not like '%burn%cloth%' THEN 'BURN' ELSE END) I need to traslate the code to use terms stored in a table like the one below, I know it requires LOOPING of some sort, but not sure how to implement. Thank you in advnaced SAFETY TERM EXCLUSIONS SAFETY_BUCKET BURN N BURNS DAMAG N DAMAGE BURNER Y BURNS BURNT OFF Y BURNS UNIT RELY Y BURNS NONN BUR Y BURNS SHOULD LOOK LIKE Y DAMAGE
... View more