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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
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 !!!

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 736 views
  • 1 like
  • 2 in conversation