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.

672 Examples 4 Chapter 23ExamplesThe following example creates a new ODBC table, TESTUSER.EXCHANGE, fromthe DLIB.RATEOFEX data file. You must be granted the appropriate privileges inorder to create new ODBC tables or views.proc dbload dbms=odbc data=dlib.rateofex;dsn=sample;user=’testuser’;password=’testpass’;table=exchange;rename fgnindol=fgnindollars4=dollarsinfgn;nulls updated=n fgnindollars=ndollarsinfgn=n country=n;load;run;The following example only sends an ODBC SQL GRANT statement to the SAMPLEdatabase and does not create a new table. There<strong>for</strong>e, the TABLE= and LOADstatements are omitted.proc dbload dbms=odbc;user=’testuser’;password=’testpass’;dsn=sample;sql grant select on testuser.exchangeto dbitest;run;Temporary Table Support <strong>for</strong> ODBCOverviewFor general in<strong>for</strong>mation about this features, see .“Temporary Table Support <strong>for</strong> <strong>SAS</strong>/<strong>ACCESS</strong>” on page 38Establishing a Temporary TableWhen you want to use temporary tables that persist across <strong>SAS</strong> procedures and DATAsteps with ODBC, you must use the CONNECTION=SHARED LIBNAME option. Whenyou do this, the temporary table is available <strong>for</strong> processing until the libref is closed.Terminating 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 asingle connection.

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

Saved successfully!

Ooh no, something went wrong!