Contains and Between-And operators in SAS Programming Last Updated : 23 Jul, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report BETWEEN-AND Operator: Between Two Numbers Task 1: Suppose you want to select scores whose values are greater than or equal to 50 and less than or equal to 90. SQL data readin; input name $ Section $ Score; cards; Raj A 80 Atul A 77 Priya B 45 Sandeep A 95 Rahul C 84 Shreya C 44 ; run; data readin1; set readin; where Score between 50 and 90; run; where Score between 50 and 90 => This would tell SAS to select values through 50 and 90 (not 51 to 89). Output This can also be written like: where Score GE 50 and Score LE 90; CONTAINS Operator: Searching specific character Task 2: Suppose you want to select only those observations in which students' name contain 'hil'. SQL data readin; input name $ Section $ Score; cards; Raj A 80 Atul A 77 Priya B 45 Sandeep A 95 Rahil C 84 Sahil B 44 ; run; data readin1; set readin; where name contains 'hil'; run; where name contains 'hil' => This would tell SAS to select observations having the values Rahil, Sahil for the variable NAME. Note: The CONTAINS operator is case sensitive. Output Comment More infoAdvertise with us Next Article IS MISSING and IS NOT MISSING Operators in SAS Programming S ShubhamMaurya3 Follow Improve Article Tags : Software Engineering SAS Programming Similar Reads IS MISSING and IS NOT MISSING Operators in SAS Programming IS MISSING Operator: Selecting Missing Values Task 1: Suppose you want to select only those observations in which students did not fill their section information. SQL data readin; input name $ Section $ Score; cards; Raj A 80 Atul . 77 Priya B 45 Sandeep A 95 Rahul . 84 Shreya . 44 ; run; data readi 2 min read Like Operator in SAS Programming LIKE Operator: Pattern Matching The LIKE operator used to select data by comparing the values of a character variable to a specified pattern. It is case sensitive. Task 1: To select all students with a name that starts with the letter S. There are two special characters patterns available for specif 1 min read How to Create or Modify a Variable in SAS Programming? This will help you to create or modify a variable. It is common to define a new variable based on the existing variable. Let's create a dataset In the code below, we are creating a dataset named as Example1 which is going to store on WORK(temporary) library. In this dataset, there would be a variabl 2 min read SAS | Date Formats and Informats Informats is used to tell SAS how to read a variable whereas Formats is used to tell SAS how to display or write values of a variable. Informats is basically used when you read in sample data which is being created using CARDS/DATALINES statement or read or import data from either an external file ( 2 min read How to Use & and && Operator in MATLAB? MATLAB is a high-performance language that is used for matrix manipulation, performing technical computations, graph plottings, etc. It stands for Matrix Laboratory. An operator is a symbol that operates on a value to perform specific mathematical or logical computations. They form the foundation of 3 min read How To Use | and || Operator in MATLAB? In MATLAB, | and || are both logical operators that are used to perform logical OR operations on Boolean variables, however, there is a subtle difference between the two: |||Â The element-wise logical OR operator "|" takes two arrays of the same size and returns an array of the same size where each e 4 min read Like