Hi~
To match COMPGED scores to 100 or less, I used compged function as below.
==========================================
libname proj "D:\SASWORK";
proc sql; *evaluate name similarity with score 0~100;
create table nameexample
as select *, compged (lender, mgrname) as similarity
from proj.periodexample
where calculated similarity le 100;
quit;
==========================================
There is no problem from line 1 to 5.
However, when I add 'where calculated similarity le 100;', I can't get the result.
The log message is as follows :
=========================================================
Note : Table WORK.NAMEEXAMPLE created, with 0 rows and 11 columns.
=========================================================
I would really appreciate it if anyone could give me a help.
Thanks!
Hello @Smile1 ,
I guess you do not have any COMPGED costs below (ore equal to) 100.
Please check for minimal 'similarity' value after running your PROC SQL without the where clause.
Or maybe you need some COMPGED modifiers (to ignore case, to remove blanks, to remove quotation marks during / before comparison).
If there are WARNINGs or ERRORs in your LOG, please publish your LOG in this thread.
Make use of the Insert Code icon </> in the toolbar and paste your LOG in the pop-up window. That way the LOG preserves structure and formatting (and some colors).
Thanks,
Koen
Hello @Smile1 ,
I guess you do not have any COMPGED costs below (ore equal to) 100.
Please check for minimal 'similarity' value after running your PROC SQL without the where clause.
Or maybe you need some COMPGED modifiers (to ignore case, to remove blanks, to remove quotation marks during / before comparison).
If there are WARNINGs or ERRORs in your LOG, please publish your LOG in this thread.
Make use of the Insert Code icon </> in the toolbar and paste your LOG in the pop-up window. That way the LOG preserves structure and formatting (and some colors).
Thanks,
Koen
Note: The main advantage of COMPGED is the ability to modify the costs of edit operations by calling CALL COMPCOST prior to calling the COMPGED function. But you can't do that in SQL... so you might be better using the COMPLEV function instead. It is faster and the results are easier to understand.
complev (lender, mgrname) le 2;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.