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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 749 views
  • 0 likes
  • 2 in conversation