Data Set Options for Relational Databases |
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
|
DBCONDITION="DBMS-SQL-query-clause"
|
-
DBMS-SQL-query-clause
-
is a DBMS-specific SQL query clause, such
as WHERE, GROUP BY, HAVING, or ORDER BY.
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=.
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;
DBINDEX= Data Set Option
DBKEY= Data Set Option
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.