Hi All:
Quick question -
I have 2 SAS tables that have a lot of variables in them (200+) . I expect that all variables except 1 are the
same (a datetime value).
Is there a way to run PROC COMPARE on all variables except 1 (like using a EXCLUDE=varname) ?
would rather not use a data step with a "DROP=" if it can be helped. Also these tables a large so I need
to keep that in mind.
Thanks in advance.
No. You can use the data set option DROP so it will not require a DATA step.
proc compare data=one(drop=ignore_me) compare=two;
run;
Answered my own question...
use (DROP=variable) on each or the tables in the compare.
I didn't know the DROP= could be user there.....
It was such a simple solution (to drop the variable from both sides), but did not click me. Thanks for sharing it. It worked.
- Dr. Abhijeet Safai
It has a been a long time ago using that.
Does the datasetoptions (like where) not work and than coding the drop there?. SAS(R) 9.4 Data Set Options: Reference
(did have diner before finishing the message)
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—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.