BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Tecla1
Quartz | Level 8

buonasera, devo verificare la presenza di alcune parole, contenute in un DB "A", in un altro DB "B" e come risultato devo avere il contenuto di una cella della riga dove la parola (anche non precisa ma simile) è contenuta. 

Simile al cerca vert in xls 

Grazie !!!:

Db "A" / "B" 

1 ACCEPTED SOLUTION

Accepted Solutions
Tecla1
Quartz | Level 8

PROC SQL; CREATE TABLE DIPO.PROVA AS SELECT 
A.EVENTO_CODE_1,
A.EVENTO_DESC_1
FROM DIPO.down_1648476285193 AS A INNER JOIN DIPO.VARIABILI AS B
ON A.EVENTO_DESC_1  CONTAINS B.VARIABILI_COL_W_R;
QUIT;


Buonasera,
in questa sql devo utilizzare "Contains" ma in un significato di "simile", non "strettamente uguale", cosa posso usare?
Grazie

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

You might want to use the LIKE operator, which allows you to find matches for a pattern. This article and video might help.

 

Another technique is "fuzzy matching" using spelling distance functions. See this article.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
Tecla1
Quartz | Level 8

PROC SQL; CREATE TABLE DIPO.PROVA AS SELECT 
A.EVENTO_CODE_1,
A.EVENTO_DESC_1
FROM DIPO.down_1648476285193 AS A INNER JOIN DIPO.VARIABILI AS B
ON A.EVENTO_DESC_1  CONTAINS B.VARIABILI_COL_W_R;
QUIT;


Buonasera,
in questa sql devo utilizzare "Contains" ma in un significato di "simile", non "strettamente uguale", cosa posso usare?
Grazie

Tecla1
Quartz | Level 8

 Ciao grazie per la risposta !!!

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
  • 3 replies
  • 1242 views
  • 1 like
  • 2 in conversation