Previous Page | Next Page

Data Set Options for Relational Databases

DBCONDITION= Data Set Option



Specifies criteria for subsetting and ordering DBMS data.
Default value: none
Valid in: DATA and PROC steps (when accessing DBMS data using SAS/ACCESS software)
DBMS support: Aster nCluster, DB2 under UNIX and PC Hosts, DB2 under z/OS, Greenplum, HP Neoview, Informix, Microsoft SQL Server, MySQL, Netezza, ODBC, OLE DB, Oracle, Sybase, Sybase IQ, Teradata

Syntax
Syntax Description
Details
Example
See Also

Syntax

DBCONDITION="DBMS-SQL-query-clause"

Syntax Description

DBMS-SQL-query-clause

is a DBMS-specific SQL query clause, such as WHERE, GROUP BY, HAVING, or ORDER BY.


Details

You can use this option to specify selection criteria in the form of DBMS-specific SQL query clauses, which the SAS/ACCESS engine passes directly to the DBMS for processing. When selection criteria are passed directly to the DBMS for processing, performance is often enhanced. The DBMS checks the criteria for syntax errors when it receives the SQL query.

The DBKEY= and DBINDEX= options are ignored when you use DBCONDITION=.


Example

In this example, the function that is passed to the DBMS with the DBCONDITION= option causes the DBMS to return to SAS only the rows that satisfy the condition.

proc sql;
   create view smithnames as
      select lastname from myoralib.employees
             (dbcondition="where soundex(lastname) = soundex('SMYTHE')" )
              using libname myoralib oracle user=testuser pw=testpass path=dbmssrv;

select lastname from smithnames;


See Also

DBINDEX= Data Set Option

DBKEY= Data Set Option

Previous Page | Next Page | Top of Page