Advertisement
leannemcn13

delete null columns

May 14th, 2019
3,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 0.29 KB | None | 0 0
  1. %macro delete_empty;
  2. ods select none;
  3. ods output nlevels=temp;
  4. proc freq data=sv10 nlevels;
  5.  tables _all_;
  6. run;
  7. proc sql;
  8.  select tablevar into : drop separated by ','
  9.   from temp
  10.    where NNonMissLevels=0;
  11.    
  12.   alter table sv10
  13.    drop &drop;
  14. quit;
  15.  
  16. %mend delete_empty;
  17. %delete_empty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement