BookmarkSubscribeRSS Feed
Kaeslock223_
Fluorite | Level 6

The code actually doesn't work so I will need to go back and edit.

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Do loops do not exist in PROC SQL.

 

you could create a macro with a %DO loop and that should work in PROC SQL if you do it properly. However, since I really don't understand what you want to do (there are no columns A-E), I would need to understand the problem better in order to help.

--
Paige Miller
Tom
Super User Tom
Super User

Not sure what you mean by multiple columns.  Show some simple example data and the expected results.

 

It is not clear what you are counting.

 

Don't you just want to use the MAX() aggregate function to test if the term ever matched?

...
,max(find(t1.col_name,t2.search_terms,'it') > 0) as any_match
group by ...

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 361 views
  • 0 likes
  • 3 in conversation