11-07-2013 10:30 AM
I am comparing two datasets where the following values exist on the same records in both:
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?
11-07-2013 01:06 PM
Does one of the columns have a format applied to it, perhaps?
What do you get if you submit the following?:
proc compare base =have1
The above shows no difference on SAS 9.1.3 on PC and Mainframe.
11-07-2013 02:37 PM
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!