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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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