BookmarkSubscribeRSS Feed
shamps
Calcite | Level 5

Morning all,

I work within Hospital episodes and we are exploring the use of SAS EG as a reporting/querying tool as opposed to Business Objects but the one thing that is not present when performing a join to another table (for lookup/reference purposes) is a CONTAINS operator.

CONTAINS is present in DI on a sql join and I am aware that you can amend the code within EG to state CONTAINS but this would be a really useful feature of EG that when you join two tables together you can state (for example)

 

t1.DIAG3 = t2.CODE

In this example - if the t1.DIAG3 was a single code and then the t2.CODE was not as specific - you could use CONTAINS, IS LIKE, MATCHES etc... within DI but not in EG - All EG offers you to select from is basic =, <=, >=, ^=, and then < or > - I dont want to amend the code as then every time a user needs to perform this, they have to have some knowledge of code to be able to use EG.

This is particularly useful when trying to search for a diagnosis code (t1.DIAG3) that appears within a long concatenated string of diagnoses...

Can anyone shed any ideas how to get around this issue...?

Many thanks

Steve

1 REPLY 1
LinusH
Tourmaline | Level 20

Is DIAG the only join column? If so, Ican't see a point and click way to do this in EG.

One "stupid" work-around could be to add column to each table always containing the value 1, and join on that. Then you could get the user to use "Filter to include in the join tables on-clause"..."Edit", where CONTAINS is available in the advanced filter builder.

Data never sleeps

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

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
  • 1 reply
  • 1366 views
  • 0 likes
  • 2 in conversation