BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AJS1
Obsidian | Level 7
proc print data=pg1.eu_occ;
    where Hotel is missing and ShortStay is missing and 
          Camp is missing;
run;

Is there a "shortcut" code to the WHERE statement?   Why can't you use:  WHERE Hotel and ShortStay and Camp is missing;

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

 

Counts the number of missing arguments.

Category: Descriptive Statistics

View solution in original post

3 REPLIES 3
data_null__
Jade | Level 19

@AJS1 wrote:
proc print data=pg1.eu_occ;
    where Hotel is missing and ShortStay is missing and 
          Camp is missing;
run;

Is there a "shortcut" code to the WHERE statement?   Why can't you use:  WHERE Hotel and ShortStay and Camp is missing;


Because that syntax is invalid.

 

35         proc print data=sashelp.class;
36            where cmiss(name,age,weight) eq 3;
37            run;

NOTE: No observations were selected from data set SASHELP.CLASS.
NOTE: There were 0 observations read from the data set SASHELP.CLASS.
      WHERE CMISS(name, age, weight)=3;

 

 

AJS1
Obsidian | Level 7

Does cmiss represent "character missing"?

data_null__
Jade | Level 19

 

Counts the number of missing arguments.

Category: Descriptive Statistics

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

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