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.


Difference between revisions of "Tip of the Day:December 22"

From sasCommunity
Jump to: navigation, search
m (Scheduled Adding a User in SAS Management Console)
(Scheduled BETWEEN does mean between)
 
Line 5: Line 5:
 
sasCommunity Tip of the Day
 
sasCommunity Tip of the Day
 
</h1><div style="padding:10px;">
 
</h1><div style="padding:10px;">
{{Tips:Adding a User in SAS Management Console}}
+
{{Tips:BETWEEN does mean between}}
 
<div style="width:100%"><hr></div>
 
<div style="width:100%"><hr></div>
Feel free to [[Tips Talk:Adding a User in SAS Management Console|comment]] on this tip.
+
Feel free to [[Tips Talk:BETWEEN does mean between|comment]] on this tip.
 
</div>
 
</div>
 
</td></tr>
 
</td></tr>

Latest revision as of 23:31, 20 December 2014

sasCommunity Tip of the Day

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;


Submitted By Don Henderson (talk)



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip