- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 02-20-2008 03:57 PM
(1886 views)
I wanted to use a Oracle hint in my query in EG but don't know how to approach. Any suggestion? Thanks!
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This can be done. I have done this, years ago.
1) You have to use the proc sql pass-through form of connection to Oracle
[pre]
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;
[/pre]
2)
In the Oracle connection string, there is a required option
from "help" for SAS/ACCESS for Oracle, pass-through facility
PRESERVE_COMMENTS
enables you to pass additional information (called hints) to Oracle for processing. These hints might direct the Oracle query optimizer to choose the best processing method based on your hint.
You specify PRESERVE_COMMENTS as an argument in the CONNECT statement. Then you specify the hints in the CONNECTION TO component's Oracle SQL query. The hints are entered as comments in the SQL query and are passed to and processed by Oracle.
1) You have to use the proc sql pass-through form of connection to Oracle
[pre]
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;
[/pre]
2)
In the Oracle connection string, there is a required option
from "help" for SAS/ACCESS for Oracle, pass-through facility
PRESERVE_COMMENTS
enables you to pass additional information (called hints) to Oracle for processing. These hints might direct the Oracle query optimizer to choose the best processing method based on your hint.
You specify PRESERVE_COMMENTS as an argument in the CONNECT statement. Then you specify the hints in the CONNECTION TO component's Oracle SQL query. The hints are entered as comments in the SQL query and are passed to and processed by Oracle.