Register Login

What is the Syntax for Secondary Index in Program before Select Statement?

Updated May 18, 2018

Hello Experts,

Please assist that what is the syntax for secondary index in program before select statement?

Kindly share your valuable views here.

Thanks in advance.


Comments

  • 20 Nov 2015 3:07 pm Abhijeet Mudgal Helpful Answer

    I am not sure what you mean to say about syntax of secondary index. there is no special syntax for primary index and secondary index in select statements, but if you want you can specify to use a particualr index always while selecting by using oracle % hint in the select statement follow the below syntax.

    SELECT MAX( kkop~augbd )
    INTO it_gen_docs-augbd
    FROM ( fkkvkp AS vkp INNER JOIN dfkkop AS kkop
    ON vkpvkont = kkopvkont ) INNER JOIN dfkkko AS kkko
    ON kkopaugbl = kkkoopbel
    WHERE vkp~exvko = ti_cuentas-exvko
    AND kkop~bukrs = p_bukrs
    AND kkop~blart IN r_blart
    AND kkop~augst = '9'
    AND kkko~blart IN r_blartd
    %_HINTS ORACLE 'INDEX("DFKKOP" "DFKKOP~Z07")'.
    DFKKOP is the table name and DFKKOP~Z07 is the index.


×