From the course: SAS® 9.4 Cert Prep: Part 03 Exploring and Validating Data
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Filtering rows with the WHERE statement - SAS Tutorial
From the course: SAS® 9.4 Cert Prep: Part 03 Exploring and Validating Data
Filtering rows with the WHERE statement
- [Instructor] What if you want to filter the rows that appear in a PROC print report? Or what if you only want to calculate summary statistics for a subset of the data based on a condition? You can use the powerful and flexible WHERE statement to subset your data. The WHERE statement can be used in PROC print, MEANS, FRIQ, UNIVAREA, and many others. The WHERE statement consists of the keyword where followed by one or more expressions. An expression tests the value of a column against a condition that you specify. First, let's look at expressions that use basic operators. We can use any of these operators to compare the value of a column to a value that you specify. The expression evaluates as true or false for each row. You can either use the symbol or letters to represent these operators in an expression. When you specify a value keep in mind that character values are case sensitive and must be enclosed in double or…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Filtering rows with the WHERE statement1m 52s
-
(Locked)
Combining expressions in a WHERE statement58s
-
(Locked)
Demo: Filtering rows with basic operators5m 54s
-
(Locked)
Using special WHERE operators1m 17s
-
(Locked)
Creating and using macro variables2m 6s
-
Demo: Filtering rows using macro variables3m 40s
-
(Locked)
-
-