This course is designed for experienced SAS users who would like to learn PROC SQL syntax to enhance current SAS applications.
Duration
1 day
Prerequisites
Students should be able to run SAS at their site and have a basic understanding of the SAS software.
Abstract
PROC SQL is a powerful Base SAS® PROC combining the functionality of the DATA and PROC Steps into a single procedure. PROC SQL in some cases is a more efficient alternative to traditional SAS code. PROC SQL can be used to retrieve, update, and report on information from SAS data sets or other database products. This course will not discuss the use of PROC SQL as an interface tool to other database products, but rather it will concentrate on SQL syntax and how to access information from existing SAS data sets.
Objectives
Identify when and how PROC SQL can be used in SAS programs
Write SQL code using various styles of the SELECT statement
Dynamically create new variables on the SELECT statement
Use SQL options to control the appearance of reports
Create multiple reports on a single PROC SQL statement
Create reports containing percentages using PROC SQL
Use CASE/WHEN clauses for conditionally processing the data
Improve the appearance of reports by using FORMATs, LABELs, TITLEs, FOOTNOTEs, and OPTIONS
Aggregate data using summary functions and the GROUP BY statement
Rearrange the order of the data by using the ORDER BY clause
Subset data using the WHERE and HAVING clauses
Create TABLEs and VIEWs on PROC SQL
Use the SET operators to bring multiple data sets together
Use subqueries to subset data prior to bringing multiple data sets together
Join data and use the different joining techniques