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.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Oracle 4 Overview 719SyntaxHere is the syntax to create a temporary table <strong>for</strong> which the data istransaction-specific (default):CREATE GLOBAL TEMPORARY TABLE table name ON COMMIT DELETEROWSHere is the syntax to create a temporary table <strong>for</strong> which the data is session-specific:CREATE GLOBAL TEMPORARY TABLE table name ON COMMIT PRESERVEROWSTerminating a Temporary TableYou can drop a temporary table at any time, or allow it to be implicitly dropped whenthe connection is terminated. Temporary tables do not persist beyond the scope of asinge connection.ExampleIn the following example, a temporary table, TEMPTRANS, is created in Oracle tomatch the TRANS <strong>SAS</strong> data set, using the SQL pass-through facility:proc sql;connect to oracle (user=scott pw=tiger path=oraclev9);execute (create global temporary table TEMPTRANS(empid number, salary number)) by oracle;quit;libname ora oracle user=scott pw=tiger path=oracle9 connection=shared;/* load the data from the TRANS table into the Oracle temporary table */proc append base=ora.TEMPTRANS data=TRANS;run;proc sql;/* do the join on the DBMS server */select lastname, firstname, salary from ora.EMPLOYEES T1, ora.TEMPTRANSwhere T1.empno=T2.empno;quit;T2<strong>ACCESS</strong> Procedure Specifics <strong>for</strong> OracleOverviewFor general in<strong>for</strong>mation about this feature, see Appendix 1, “The <strong>ACCESS</strong> Procedure<strong>for</strong> <strong>Relational</strong> <strong>Databases</strong>,” on page 893. Oracle examples are available.The Oracle interface supports all <strong>ACCESS</strong> procedure statements in line and batchmodes. See “About <strong>ACCESS</strong> Procedure Statements” on page 894.Here are the <strong>ACCESS</strong> procedure specifics <strong>for</strong> Oracle.

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

Saved successfully!

Ooh no, something went wrong!