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.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to OLE DB 4 Examples 695Output 24.1Provider and Properties OutputPROVIDER_NAME PROVIDER_DESCRIPTION PROVIDER_PROPERTIES------------- -------------------- -------------------MSDAORA Microsoft OLE DB Password;User ID;DataProvider <strong>for</strong> Oracle Source;Window Handle;LocaleIdentifier;OLE DB Services;Prompt; Extended Properties;SampProv Microsoft OLE DB Data Source;Window Handle;Sample ProviderPrompt;You could then reference the output when automating a connection to the provider.For the previous result set, you could write this <strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statement:libname mydblib oledb provider=msdaoraprops=(’Data Source’=OraServer ’User ID’=scott ’Password’=tiger);Temporary Table Support <strong>for</strong> OLE DBOverviewFor general in<strong>for</strong>mation about this feature, see “Temporary Table Support <strong>for</strong> <strong>SAS</strong>/<strong>ACCESS</strong>” on page 38.Establishing a Temporary TableWhen you want to use temporary tables that persist across <strong>SAS</strong> procedures and DATAsteps with OLE DB, you must use the CONNECTION=SHARED LIBNAME option. Indoing so, 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 asinge connection.ExamplesUsing the sample Internat table, this example creates a temporary table, #LONDON,with Microsoft SQL Server. It contains in<strong>for</strong>mation about flights that flew to London.This table is then joined with a larger SQL Server table that lists all flights, March, butmatched only on flights that flew to London.libname samples oledb Provider=SQLOLEDB Password=dbigrp1 UID=dbitestDSN=’lupin\sql2000’ connection=shared;data samples.’#LONDON’n;

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

Saved successfully!

Ooh no, something went wrong!