Skip to Main Content
SAS Certified Professional Prep Guide
book

SAS Certified Professional Prep Guide

by SAS Institute
October 2019
Intermediate to advanced content levelIntermediate to advanced
430 pages
19h 4m
English
SAS Institute
Content preview from SAS Certified Professional Prep Guide

The WHERE Clause

A Brief Overview

The WHERE clause enables you to subset data based on a condition that each row of the table must satisfy. PROC SQL output includes only those rows that satisfy the condition. The WHERE clause is used within the SELECT statement in a PROC SQL step. The expression in the WHERE clause can be any valid SQL expression. In the WHERE clause, you can specify any columns from the underlying tables that are specified in the FROM clause. The columns that are specified in the WHERE clause do not have to be specified in the SELECT clause.

WHERE Clause Syntax

The WHERE clause must come after the SELECT and FROM clauses.
Syntax, WHERE clause:
PROC SQL <options>;
SELECT column-1 <,...column-n>
FROM input-tables ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS Certified Specialist Prep Guide

SAS Certified Specialist Prep Guide

SAS Institute
SAS in Practice

SAS in Practice

Ekta Saraogi

Publisher Resources

ISBN: 9781642954692