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 Oracle 4 Overview 715by oracle;execute (grant select on whotookordersto testuser) by oracle;disconnect from oracle;quit;As shown in highlighted text, this example per<strong>for</strong>ms a query on the CUSTOMERSOracle table:proc sql;connect to oracle (user=testuser password=testpass);select *from connection to oracle(select * from customerswhere customer like ’1%’);disconnect from oracle;quit;In this example, the PRESERVE_COMMENTS argument is specified after theUSER= and PASSWORD= arguments. The Oracle SQL query is enclosed in therequired parentheses. The SQL INDX command identifies the index <strong>for</strong> the Oraclequery optimizer to use to process the query. Multiple hints are separated with blanks.proc sql;connect to oracle as mycon(user=testuserpassword=testpass preserve_comments);select *from connection to mycon(select /* +indx(empid) all_rows */count(*) from employees);quit;Hints are not preserved in this next example, which uses the prior style of syntax:execute ( delete /*+ FIRST_ROWS */ from test2 where num2=1)by &dbUsing the new syntax, hints are preserved in this example:execute by &db( delete /*+ FIRST_ROWS */ from test2 where num2=2);Autopartitioning Scheme <strong>for</strong> OracleOverviewWithout user-specified partitioning from the DBSLICE= option, <strong>SAS</strong>/<strong>ACCESS</strong>Interface to Oracle tries to use its own partitioning techniques. The technique itchooses depends on whether the table is physically partitioned on the Oracle server.For general in<strong>for</strong>mation about this feature, see “Autopartitioning Techniques in <strong>SAS</strong>/<strong>ACCESS</strong>” on page 57.Note: Threaded reads <strong>for</strong> the Oracle engine on z/OS are not supported. 4

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

Saved successfully!

Ooh no, something went wrong!