Chapter Contents

Previous

Next
DBCONDITION=

DBCONDITION=



Specifies criteria for subsetting and ordering DBMS data.

Default value: none


Syntax
Details

Syntax

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.


Details

The DBCONDITION= data set option enables you to pass a DBMS-specific SQL selection condition to the DBMS for processing.

When you create a view descriptor, you can use the PROC ACCESS SUBSET statement to specify selection criteria. These criteria are in the form of DBMS specific SQL query clauses, which the SAS/ACCESS engine passes directly to the DBMS for processing. Beginning in Version 7, the DBCONDITION= data set option enables you to perform the same task. 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.

In the following example, the function 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')" )
                    from payroll2)")
     using libname myoralib oracle user=sasdemo pw=sasdemo1 path=dbmssrv;

select lastname from smithnames;


Chapter Contents

Previous

Next

Top of Page

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