By default, processing
is passed to the data source when possible, because the data source
might be able to process the functionality more efficiently than SAS
does. In some instances, however, you might not want the data source
to process the SQL. For example, the presence of null values in DBMS
data might cause different results depending on whether the processing
takes place in SAS or in the DBMS. If you do not want the data source
to handle the SQL, use DIRECT_SQL= to force SAS to handle some or
all of the SQL processing.
If you specify DIRECT_SQL=NOGENSQL,
PROC SQL does not generate data source SQL. This means that SAS functions,
joins, and DISTINCT processing that occur
within PROC
SQL are not passed to the DBMS for processing. (SAS functions
outside PROC
SQL can still be passed to the DBMS.) However, if PROC SQL contains
a WHERE clause, the WHERE clause
is passed
to the data source, if possible. Unless you specify DIRECT_SQL=NOWHERE,
SAS attempts to pass all WHERE clauses to the data source.
If you specify more
than one value for this option, separate the values with spaces and
enclose the list of values in parentheses. For example, you could
specify DIRECT_SQL=(NOFUNCTIONS, NOWHERE).