Specifying Oracle Comments/Hints Using SAS/ACCESS® Interface to Oracle


Oracle Hints/Comments can be specified, using SAS/ACCESS Interface to Oracle - Proc SQL PassThrough facility.

The Oracle Hint/Comment is specified 'as is' using the comment syntax show here:

    /*    comment or hint goes here */

The following information and example are from the 9.1.3 SAS OnlineDoc:

In this example, the PRESERVE_COMMENTS argument is specified after the USER= and PASSWORD= arguments.

The Oracle SQL query is enclosed in the required parentheses.

The SQL INDX command identifies the index for the Oracle query optimizer to use in processing the query.

Note that multiple hints are separated with blanks.

    proc sql;
      connect to oracle as mycon(user=testuser
                 password=testpass preserve_comments);
      select *
      from connection to mycon
         (select /*+indx(empid) all_rows */
          count(*) from employees);
   quit;