🔒 This topic is locked.
We are no longer accepting replies to this topic. Need further help? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 07-03-2018 11:19 AM
(12986 views)
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.
This tip was originally posted by Mary Rosenbloom on sasCommunity.org.