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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

582 Terminating a Temporary Table 4 Chapter 19LIBNAME statement is required even if you connect to the database using thePass-Through Facility CONNECT statement, because it establishes a connection group.For every new PROC SQL step or LIBNAME statement, you must reissue aCONNECT statement with the CONNECTION_GROUP= option set to the same valueso that the connection can be reused.Terminating a Temporary TableTo terminate a temporary table, disassociate the libref by issuing this statement:libname libref clear;ExampleIn this Pass-Through example, joins are pushed to In<strong>for</strong>mix:libname x in<strong>for</strong>mix user=tester using=xxxxx server=dsn_nameconnection=global connection_group=mygroup;proc sql;connect to in<strong>for</strong>mix (user=tester using=xxxxx server=dsn_nameconnection=global connection_group=mygroup);execute (select * from t1 where (id >100)into scratch scr1 ) by in<strong>for</strong>mix;create table count2 as select * from connection to in<strong>for</strong>mix(select count(*) as totrec from scr1);quit;proc print data=count2;run;proc sql;connect to in<strong>for</strong>mix (user=tester using=xxxxx server=dsn_nameconnection=global connection_group=mygroup);execute(select t2.fname, t2.lname, scr1.dept from t2, scr1 where(t2.id = scr1.id) into scratch t3 ) by in<strong>for</strong>mix;quit;libname x clear; /* connection closed, temp table closed */Passing <strong>SAS</strong> Functions to In<strong>for</strong>mix<strong>SAS</strong>/<strong>ACCESS</strong> Interface to In<strong>for</strong>mix passes the following <strong>SAS</strong> functions to In<strong>for</strong>mix <strong>for</strong>processing if the DBMS driver or client that you are using supports this function. Formore in<strong>for</strong>mation, see “Passing Functions to the DBMS Using PROC SQL” on page 42.ABSARCOS

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

Saved successfully!

Ooh no, something went wrong!