Hi,
NE Washington DC newbie user here. Tried using manuals and online help and just a little lost. I am trying to use the proc compare command to compare the data in two tables. However, the two tables of data appear to be sorted differently.
Thus the delimma how to write a query that will order the data in away that I can compare to tables.
The query.
libname xdata 'c:\SAS_Testing\ndprod3';
proc compare data=xdata.county_msa compare=xdata.county_msa1 ;
run;
proc sql;
select * from xdata.county_msa
where state_fips = '72'
order by cnty;
quit;
The results.
The COMPARE Procedure
Comparison of XDATA.COUNTY_MSA with XDATA.COUNTY_MSA1
(Method=EXACT)
Data Set Summary
Dataset Created Modified NVar NObs
XDATA.COUNTY_MSA 04FEB08:14:53:42 04FEB08:14:53:58 12 970599
XDATA.COUNTY_MSA1 07FEB08:11:31:27 07FEB08:11:31:27 12 970599
Variables Summary
Number of Variables in Common: 12.
Number of Variables with Differing Attributes: 12.
Value Comparison Results for Variables
__________________________________________________________
|| state_fips
|| Base Value Compare Value
Obs || state_fips state_fips
________ || __ __
||
1 || 01 48
2 || 01 48
3 || 01 48
4 || 01 48
5 || 01 48
6 || 01 48
7 || 01 48
8 || 01 48
9 || 01 48
__________________________________________________________
|| cnty
|| Base Value Compare Value
Obs || cnty cnty
________ || ___ ___
||
1 || 001 059
2 || 001 059
3 || 001 059
4 || 001 059
5 || 001 059
6 || 001 059
Any help would be greatly appreciated.
Thanks
Alienographer
... View more