BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mattneo
Obsidian | Level 7

Hi. I have a database connected to SAS VA. This database contains all customer correspondence, and one of the data item is “Case title”, which is the subject title for a case. Out of the hundreds and thousands of cases in the database, I want to retrieve cases that have specified keywords (eg. “poor service”, “bad attitude”) in the title.

 

I went to advanced filter and use the following expression:

UPCASE( Case title) contains UPCASE(“poor service”)

Sure enough, the list table shows only cases with “poor service” in the titles. However I also need cases with “bad attitude” in the same list table. I tried the following with the OR operator:

UPCASE( Case title) contains OR( UPCASE(“poor service”)

                                                          UPCASE(“bad attitude”)

It doesn’t work. Threw up an error saying Boolean used but expecting Character or something. Please help. How can I retrieve cases based on a set of keywords?

1 ACCEPTED SOLUTION

Accepted Solutions
Sam_SAS
SAS Employee

It is inelegant, but you should be able to use:

OR (UPCASE(Case title) contains UPCASE("poor service")
UPCASE(Case title) contains UPCASE("bad attitude")))

 

That is, repeat the entire condition for each OR case.

 

There may also be a much better solution someone else could offer 🙂

View solution in original post

2 REPLIES 2
Sam_SAS
SAS Employee

It is inelegant, but you should be able to use:

OR (UPCASE(Case title) contains UPCASE("poor service")
UPCASE(Case title) contains UPCASE("bad attitude")))

 

That is, repeat the entire condition for each OR case.

 

There may also be a much better solution someone else could offer 🙂

mattneo
Obsidian | Level 7
Thanks sam. It works! I actually have more keywords so i guess i have to keep adding OR operators. If theres a more efficient way, like to reference a list of words the user enters, will love to hear it.... But this will do for now. Thks again

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

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