Chapter Contents

Previous

Next
SAS SQL Query Window User's Guide

Changing Access Modes

If you have SAS/ACCESS Interface to Oracle installed, you can switch access modes and use the SQL Pass-Through facility to query ORACLE tables.


ORACLE Access Mode Options

From the SQL QUERY TABLES window, select

Tools
[arrow]
Switch Access Mode
[arrow]
ORACLE

to display the Oracle Access Mode Options window.

[IMAGE]

Fill in the fields with the information appropriate for your site. Contact your ORACLE administrator for more information.


Creating a WHERE Expression

Select OK to return to the SQL QUERY TABLES window. The sample tables that are available with your ORACLE DBMS are listed in the Available Tables column.

Select ORDERS from the list of Available Tables and move it to the list of Selected Tables. Select OK to display the SQL QUERY COLUMNS window

[IMAGE]

Select FABRICCHARGES, SHIPTO, DATEORDERED, TAKENBY, and PROCESSEDBY from the list of Available Columns and add them to the list of Selected Columns.

Select

View
[arrow]
Where Conditions for Subset...

to display the WHERE EXPRESSION window.

Select SHIPPED from the list of Available Columns. Select Is Not Missing from the menu of OTHER Operators.

[IMAGE]

Select OK to close the WHERE EXPRESSION window.


Viewing Your Query

From the SQL QUERY COLUMNS window, select

Tools
[arrow]
Show Query...

to view your query.

[IMAGE]

This query reports information for orders that have been shipped. ORACLE SQL is generated as the query is built.

The syntax enclosed by the parentheses following ORACLE is transported through the SQL Procedure Pass-Through facility to the ORACLE DBMS for processing. The Is Not Missing operator from the WHERE expression is converted to the is not null ORACLE operator.

The syntax outside of the parentheses following ORACLE is processed by the SAS System.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.