Skip to Content
author's profile photo Former Member
Former Member

viswa

i have a table in a table 4 secondary indexes

i.e z1,z2,z3,z4

i want extract z2 only

how to write select statement

pl help me

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 04:25 AM

    Hi,

    If you want to use the index Z2 in your select query, then in your select query put all the fields in where clause which are there in index Z2.

    SAP will then use this Index.

    Hope this helps!!!

    Regards,

    Lalit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 04:26 AM

    Hi,

    If Z2 is an index, you can directly use it in the select query's where cond.

    Regards,

    Subramanian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 04:27 AM

    Hi

    Select *your fields which you want to select * into table itabb where Use fields present in Z2 Index .

    Hope it helps

    regards

    Hitesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 04:30 AM

    Hi,

    ~ you have to specify all the fields in the Index(z2) in the WHERE clause, it will seelct via z2. u can check this by using ST05

    ~ if it is not picking up the index you can explicitly mention it by:

    SELECT <field1> <field2> UP TO 10 ROWS

    FROM <db-table>

    WHERE <conditions..>

    %_HINTS ORACLE 'index(<dbtable>"Z2")'

    regards,

    madhu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.