DATA Step, Macro, Functions and more

Output diffrent rows values in proc comapre

Accepted Solution Solved
Reply
Contributor
Posts: 53
Accepted Solution

Output diffrent rows values in proc comapre

Hello, could anyone please tell me how to output in proc compare diffrence rows from compare dataset.

when I use

 

proc compare base=temp compare=temp2 out=diff outnoeq;
run;

I receive xxxx values where diffrence exists.

 

Thank you.


Accepted Solutions
Solution
‎09-05-2017 08:25 AM
Super User
Super User
Posts: 7,970

Re: Output diffrent rows values in proc comapre

Yes, that is default behaviour.  The simplest method to get differences is:

proc sql;
create table WANT as select * from TEMP except select * from TEMP2; quit;

And you can do the reverese (i.e. temp/temp2 swapped) to get the other way.  

View solution in original post


All Replies
Solution
‎09-05-2017 08:25 AM
Super User
Super User
Posts: 7,970

Re: Output diffrent rows values in proc comapre

Yes, that is default behaviour.  The simplest method to get differences is:

proc sql;
create table WANT as select * from TEMP except select * from TEMP2; quit;

And you can do the reverese (i.e. temp/temp2 swapped) to get the other way.  

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 53 views
  • 0 likes
  • 2 in conversation