As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Tips:BETWEEN does mean between

From sasCommunity
Jump to: navigation, search

The BETWEEN operator of the WHERE statement and the WHERE clause do not require that the first value be less than or equal to the second one.

These two where clauses are not equivalent:

proc print data = sashelp.class;
 where age ge 14 and age le 12;
run;
proc print data = sashelp.class;
 where age between 14 and 12;
run;

The first one selects no observations, while the second one select all the students whose age is 12, 13, or 14.

Because the relative order of the values in the WHERE clause does not matter, these are equivalent:

proc print data = sashelp.class;
 where age between 14 and 12;
run;
 
proc print data = sashelp.class;
 where age between 12 and 14;
run;

....see also


Submitted By Don Henderson (talk)