BookmarkSubscribeRSS Feed
Barney1998
Obsidian | Level 7

Hallo to everyone,

I have one problem with below procedure!

I have one table A with one column a and one table B with one column b ,the column a from the A is substring from the column b from the B.I wanna to joint that tables .As result i want one table which have only the rows from the B which contain some  column from table A as substtring. I have one really big data set and i dont have the ability to check case by case .With other words i looking for one type of order like:the where variable from data statement where A.variable  like ''B.variable2'';

Thanks in advance,

Barney  

 

3 REPLIES 3
Aku
Obsidian | Level 7 Aku
Obsidian | Level 7
I would recommend transposing both tables into hyper normalized format. Then compare "Value -columns" and select "ID-values" when there is a match.
Reeza
Super User

Show some examples. If the substring is always at the beginning the =: operator may work. 

 

Ksharp
Super User
Try to use CONTAINS operator:

 where A.variable  contains strip(B.variable2) ;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 3 replies
  • 1958 views
  • 0 likes
  • 4 in conversation