BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Deesee
Calcite | Level 5

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;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
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'

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26
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'

--
Paige Miller
Deesee
Calcite | Level 5
THANKS!

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 791 views
  • 0 likes
  • 2 in conversation