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) ;

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