Hi there,
Hope to receive some help with perl expression, where there are two columns to compare with, the match column should be flagging should obs where it matches. example as below:
ColumnA Column B Mached
ABC01 ABC1 Y
PAB1 PAB01 Y
Cob1 COB1 Y
BDD01 BDC01 N
Thanks for helping.
Cheers
Build on this:
data want;
set have;
s1 = prxchange("s/01/1/", -1, string1);
s2 = prxchange("s/01/1/", -1, string2);
match = upcase(s1) = upcase(s2);
run;
You have two almost identical questions in two threads. Are both actual questions?
Build on this:
data want;
set have;
s1 = prxchange("s/01/1/", -1, string1);
s2 = prxchange("s/01/1/", -1, string2);
match = upcase(s1) = upcase(s2);
run;
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.