Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using Oracle Hint

Former Member
0 Likes
541

Hi All,

I am trying to force the select query to use an index on a Y table, but some how it is not working. The code i am using is:

SELECT matnr werks vbeln posnr FROM yyost INTO

TABLE tb_yyost1

FOR ALL ENTRIES IN tb_marc WHERE

matnr EQ tb_marc-matnr AND

werks EQ tb_marc-werks AND

auart IN ('TA','KL','SREP','ZDF') AND

clsta EQ 'C' AND

cldat GE dg_fday

%_HINTS ORACLE 'INDEX("YYOST" "YYOST~YYOST__2")'.

Where YYOST is the table and YYOST__2 is the index. Am i missing something? I looked at ST05 and saw that it is still using index YYOST__1.

Regards,

Hari.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
503

Hi,

Try this.

%_HINTS ORACLE 'INDEX("&TABLE&" "YYOST~YYOST__2" "YYOST^YYOST__2")'

Thanks,

Naren

3 REPLIES 3
Read only

Former Member
0 Likes
503

Hi,

Try this.

%_HINTS ORACLE 'INDEX("&TABLE&" "YYOST~YYOST__2" "YYOST^YYOST__2")'

Thanks,

Naren

Read only

Former Member
0 Likes
504

Hi,

Try this.

%_HINTS ORACLE 'INDEX("&TABLE&" "YYOST~YYOST__2" "YYOST^YYOST__2")'

Thanks,

Naren

Read only

Former Member
0 Likes
503

HI,

you can use inthis way also..

<b>%_HINTS ORACLE 'INDEX(YYOST"YYOST__2")'.</b>

Try this one

Regards

Sudheer