There are several reasons why a join under PROC SQL might not be passed to the DBMS for processing. In general, the success of the join depends on the nature of the SQL that was coded and the DBMS's acceptance of the generated syntax. It is also greatly influenced by the use of option values. Here are the primary reasons why join statements might fail to be passed.
PROC SQL attempts to pass an SQL join query directly to the DBMS for processing. The DBMS can reject the syntax for any number of reasons. In this event, PROC SQL attempts to open both tables individually and perform the join in SAS.
Each DBMS has specific limitations about what it allows in a join. Here are some situations that are not supported in all databases:
For the specific criteria that apply to your DBMS, see the information about passing joins for your SAS/ACCESS interface.
If the librefs are specified using different data sources (DBMS engines), servers, user IDs, or any other connection options, PROC SQL does not attempt to pass the statement to the DBMS for direct processing.
Specifying most data set options on a table that is referenced in an SQL query prohibits SAS from successfully passing the statement to the DBMS for direct processing.
Specifying LIBNAME options that request such member-level controls as table locks (READ_LOCK_TYPE= or UPDATE_LOCK_TYPE=) prohibits the statement from successfully passing to the DBMS for direct processing.
Specifying SAS functions on the SELECT clause can prevent joins from being passed.