How do I use 'LIKE' or something similar to find anything that starts
with OCM ? Do I use a WHERE statement or something else?
IF UPCASE(id_role) like 'OCM%'
THEN OUTPUT work.output_ocm;
IF UPCASE(id_role) =: 'OCM' then OUTPUT work.output_ocm;
Note the colon after the equal sign ... equal followed by colon indicates "starts with" ... that you want to find records where UPCASE(ID_ROLE) starts with 'OCM'
IF UPCASE(id_role) =: 'OCM' then OUTPUT work.output_ocm;
Note the colon after the equal sign ... equal followed by colon indicates "starts with" ... that you want to find records where UPCASE(ID_ROLE) starts with 'OCM'
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 save with the early bird rate—just $795!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.