Introduction

Structured Query Language (SQL) is a language that retrieves and updates data in relational tables and databases. SAS implements SQL through the SQL procedure.
The SQL Query Window is an interactive interface that enables you to build, save, and run queries (requests to retrieve data) without being familiar with SQL or with the SAS SQL procedure. The query that you build in the SQL Query Window is passed to the SQL procedure or to the REPORT procedure for processing when you run the query.
The SQL Query Window also provides you with the following capabilities:
  • You can create PROC SQL tables (SAS data files) and views.
  • If you have SAS/ACCESS software installed for your database management system (DBMS), then you can query DBMS data by using PROC SQL Pass-Through. Some SAS/ACCESS interfaces enable you to access data using a library engine. Library engine technology enables you to assign a libref to DBMS data and work with the data in the same way that you would with data in a SAS library. For more information, refer to the SAS/ACCESS documentation for your DBMS.
  • If SAS/CONNECT software is licensed at your site, then you can use the SQL Query Window to access data that is stored on remote hosts.
  • You can use PROC REPORT to design a report from your query output without exiting the SQL Query Window.
After exiting the SQL Query Window, you can use your query output with other SAS procedures and SAS/ASSIST software to perform various other functions such as analyzing your data or producing graphics.
For more information about the SQL and REPORT procedures, refer to the Base SAS Procedures Guide.