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: 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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 342 views
  • 0 likes
  • 3 in conversation