0% found this document useful (0 votes)
22 views

Proc SQL Intro

Proc SQL is the Base SAS implementation of SQL that allows users to perform tasks like generating reports, summary statistics, and retrieving or combining data from tables or views. It enables working with any SAS data set and is an alternative to other SAS procedures or the DATA step. Proc SQL allows users to create tables, views, and indexes as well as update data values in Proc SQL tables or DBMS tables.

Uploaded by

satishbunty592
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Proc SQL Intro

Proc SQL is the Base SAS implementation of SQL that allows users to perform tasks like generating reports, summary statistics, and retrieving or combining data from tables or views. It enables working with any SAS data set and is an alternative to other SAS procedures or the DATA step. Proc SQL allows users to create tables, views, and indexes as well as update data values in Proc SQL tables or DBMS tables.

Uploaded by

satishbunty592
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to Proc SQL

The SQL procedure is the Base SAS implementation of Structured Query Language. PROC
SQL is part of Base SAS software, and you can use it with any SAS data set (table).
Often, PROC SQL can be an alternative to other SAS procedures or the DATA step.
PROC SQL enables you to perform the following tasks:
• generate reports
• generate summary statistics
• retrieve data from tables or views
• combine data from tables or views
• create tables, views, and indexes
• update the data values in PROC SQL tables
• update and retrieve data from database management system (DBMS) tables
• modify a PROC SQL table by adding, modifying, or dropping columns

SC statistical programming
Table

A PROC SQL table is the same as a SAS data file. PROC SQL tables consist of rows and
columns. The rows correspond to observations in SAS data files, and the columns
correspond to variables.
SQL Term SAS Term Data Processing Term

table SAS data file file

row observation record

column variable field

SC statistical programming
Queries
Queries retrieve data from a table or view. A query returns a query result, which
consists of rows and columns from a table.
Views
PROC SQL views do not actually contain data as tables do. Rather, a PROC SQL view
contains a stored SELECT statement or query. The query executes when you use the
view in a SAS procedure or DATA step.
Null Values
According to the ANSI standard for SQL, a missing value is called a null value. It is not
the same as a blank or zero value. However, to be compatible with the rest of SAS,
PROC SQL treats missing values the same as blanks or zero values, and considers all
three to be null values.

SC statistical programming

You might also like