13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Optimizing Your SQL Usage 4 Passing Joins to the DBMS 433 Netezza3 ODBC3 OLE DB3 Oracle3 Sybase3 Sybase IQ3 TeradataPassing Joins to the DBMSWhen you per<strong>for</strong>m a join across <strong>SAS</strong>/<strong>ACCESS</strong> librefs in a single DBMS, PROC SQLcan often pass the join to the DBMS <strong>for</strong> processing. Be<strong>for</strong>e implementing a join, PROCSQL checks to see whether the DBMS can process the join. A comparison is made usingthe <strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statement <strong>for</strong> the librefs. Certain criteria must be met <strong>for</strong>the join to proceed. Select your DBMS to see the criteria that it requires be<strong>for</strong>e PROCSQL can pass the join.3 Aster nCluster3 DB2 Under UNIX and PC Hosts3 DB2 Under z/OS3 Greenplum3 HP Neoview3 In<strong>for</strong>mix3 MySQL3 Netezza3 ODBC3 OLE DB3 Oracle3 Sybase3 Sybase IQ3 TeradataIf it is able, PROC SQL passes the join to the DBMS. The DBMS then per<strong>for</strong>ms thejoin and returns only the results to <strong>SAS</strong>. PROC SQL processes the join if the DBMScannot.These types of joins are eligible <strong>for</strong> passing to the DBMS.3 For all DBMSs, inner joins between two or more tables.3 For DBMSs that support ANSI outer join syntax, outer joins between two or moreDBMS tables.3 For ODBC and Microsoft SQL Server, outer joins between two or more tables.However, the outer joins must not be mixed with inner joins in a query.3 For such DBMSs as In<strong>for</strong>mix, Oracle, and Sybase that support nonstandard outerjoin syntax, outer joins between two or more tables with these restrictions:Full outer joins are not supported.Only a comparison operator is allowed in an ON clause. For Sybase, the onlyvalid comparison operator is ’=’.For Oracle and Sybase, both operands in an ON clause must reference a columnname. A literal operand cannot be passed to the DBMS. Because theseDBMSs do not support this, all ON clauses are trans<strong>for</strong>med into WHERE

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!