12-07-2012 08:22 AM
I have to compare datasetA_Version1 with datasetA_Version2
V2 has more data than V1. There is NO unique identifier in this dataset.
The program should list:
So i can handle number 3.
But how can you compare 2 datasets without this unique identifier? Can you use proc compare herefore?
12-07-2012 09:19 AM
This can't be done, unless the additional observations appear at the end of one of the data sets. PROC COMPARE without a BY statements compares the first observation in one data set to the first observation in the other, then the second observation in the first data set to the second observation in the other.
A good rule of thumb to use: if you had all the data printed out on paper, could you find the differences? If the answer is "no", then SAS won't be able to either.
12-07-2012 10:28 AM
Is there a combination of variables is likely to identify records uniquely? If so you can try sorting both sets by those variables and then using Proc Compare. The default behavior compares the records by order in the data sets if no BY statement is used.
12-07-2012 10:54 AM
#1 - Look up the NOT EXISTS in sql to find records that aren't in 2 but are in 1.
#2 - I don't see how you can identify this at all if you don't have an identifier. You could only identify records in both that were identical, but not ones that had changed somehow.
#3 - That's easily done...