BookmarkSubscribeRSS Feed
Dingdang
Fluorite | Level 6

Hello,

I have a dataset and sorted it by five variables. One of these variables is named "DIFF". Now I would like to delete all the groups of observations, as long as one of the DIFF equals 0. (Deleting the observations with DIFF equals 0 is simple, but i would to delete the whole group as long as one of the observations has DIFF=0).

I would be very grateful for any help!

BR  Dingdang

1 REPLY 1
DBailey
Lapis Lazuli | Level 10

proc sql;

delete from work.have

where group in (select group from work.have where diff=0);

quit;

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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