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.


Tip of the Day:September 16

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day


As part of the decommissioning effort for sasCommunity.org this article/tip has been migrated to communities.sas.com.

The new home for this article/tip is September 16 (https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Use-the-BETWEEN-AND-Operator-to-Search-an-Inclusive/m-p/475229#M172)



The BETWEEN-AND operator can be used inside of a where statement to determine if the value of a variable is contained within an inclusive range:

proc print data=sashelp.retail;
    where year between 1980 and 1984;
run;

Notice that the boundaries that you give are always included in the range, so in this case the data from 1980 and 1984 is printed, along with data from 1981-1983.


Submitted By Otterm1



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip