DATA Step, Macro, Functions and more

Delete rows with missing value with where statement

Accepted Solution Solved
Reply
Regular Learner
Posts: 1
Accepted Solution

Delete rows with missing value with where statement

Hello,

 

I'm a SAS newbie and I'd like to delete rows with at least one missing value with the WHERE statement.

 

data example2;
set example1;
where _ALL_ is not missing;
run;

I receive this error :

 

Variable _all_ is not on file work.example1.

 

I know there are different ways to achieve my goal but I'd like to try it with WHERE and _ALL_.

 

Thank you !


Accepted Solutions
Solution
2 weeks ago
Super User
Posts: 5,513

Re: Delete rows with missing value with where statement

WHERE is not compatible with using variable lists such as _ALL_.  Time to try something else.

View solution in original post


All Replies
Solution
2 weeks ago
Super User
Posts: 5,513

Re: Delete rows with missing value with where statement

WHERE is not compatible with using variable lists such as _ALL_.  Time to try something else.

Super User
Posts: 10,035

Re: Delete rows with missing value with where statement

data class;
 set sashelp.class;
 if cmiss(of _all_) then delete;
run;
☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 123 views
  • 0 likes
  • 3 in conversation