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 ...

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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