01-21-2016 12:18 PM
No you can't use between with IF.
You can use it with WHERE - it's a SQL operator.
Please consider adding more descriptive subject lines, it's helpful for understanding and for future users who are searching the forum.
01-21-2016 12:38 PM
In a datastep you could use
data t; set test1; if 2 <= rating <= 5; run; data t; set test1; if 2 < rating < 5; run; data t; set test1; if rating >= 2 and rating <= 5; run;
Or other comparison operators such as LT LE GT GE depending on how you want the end point treated.