DBKEY= Data Set Option

« Back to Glossary Index

You can use this option to improve performance when processing a join that involves a large DBMS table and a small SAS data set or DBMS table.

The DBKEY= data set option causes the SQL Procedure to pass a WHERE clause to the DBMS so that only the rows that match the WHERE condition is retrieved from the DBMS table.

libname mydblib oracle user=testuser 
password=testpass;
proc sql;
select tab1.deptno, loc from
   mydblib.table1 (dbkey=deptno) tab1,
   sasuser.sasds tab2
   where tab1.deptno=tab2.deptno;
« Back to Glossary Index