I am comparing two datasets where the following values exist on the same records in both:
^S={font_face=Symbol}£^S={}0.25
I visually inspected the values and even copied them to EXCEL (EXCEL says they are equal)...I also used the STRIP function to remove any leading or trailing blanks. Any ideas as to why SAS says they are not equal?
Hi,
Does one of the columns have a format applied to it, perhaps?
What do you get if you submit the following?:
data have1;
a='^S={font_face=Symbol}£^S={}0.25';
run;
data have2;
a='^S={font_face=Symbol}£^S={}0.25';
run;
proc compare base =have1
compare=have2;
run;
The above shows no difference on SAS 9.1.3 on PC and Mainframe.
Regards,
Amir.
These come out the same. I think it was due to the word "symbol" having a capital letter in one instance and not in the other.
If you do not care about case then you can use upcase() to convert the text to all be upper case when you strip out the spaces.
I often use upcase(compress(variable)) when manually coding text matching, compress removes the spaces within the text too.
Watch out for spelling mistakes when comparing text this way - I have seen 5 different ways of spelling coffee!
Five ways to spell coffee is nothing, I had some survey data where IBM was spelled 18 ways. The most creative was I>B>M> .
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.