The SAS® SQL Procedure




This course is designed for experienced SAS users who would like to learn PROC SQL syntax to enhance current SAS applications.


1 days

Prerequisites Students should be able to run SAS at their site and have a basic understanding of the SAS software.


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.


  • Become familiar with the various report generation methods available in SAS
  • 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
  • Create and modify data using PROC SQL


  • An Introduction to PROC SQL
  • Additional SELECT clauses
  • The CREATE statement
  • Queries with set operators
  • Subqueries in SQL
  • Joining data with SQL
  • Creating and modifying data





Unsure? Fill out our training assessment form!

Would you like help finding your SAS training solution? Call 1-800-997-7081 or email for assistance!