Skip to Content

Inner join

hi,

how many innerjoin can be used in single select query.

regards,

ARUN

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2008 at 04:28 AM

    Hi Arun,

    I think we can do three .even more.

    but it gives performance issue better go for for all entries

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

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

    Hi,

    U can use more than one inner join. If u use more than 3 inner joins it will be a performence issue,

    See below sample code,

    SELECT a~anlage

    b~devloc

    cequnr cserge cmatnr csernr

    FROM eastl AS a

    INNER JOIN egerh AS b

    ON alogiknr EQ blogiknr

    INNER JOIN equi AS c

    ON bequnr EQ cequnr

    INTO TABLE li_device

    FOR ALL ENTRIES IN li_ocm

    WHERE a~anlage EQ li_ocm-anlage AND

    a~ab LE ws_last_day_month AND

    a~bis GE ws_last_day_month AND

    b~devloc NE space AND

    c~serge IN s_device.

    Let me know if u have any other issues,

    Regards,

    Kusuma.

    Add a comment
    10|10000 characters needed characters exceeded

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

    you can use more than one inner join.

    and you can use more than 1 table

    its alwayas a good practice not to combine more than 4 tables

    Edited by: AD on Nov 27, 2008 6:14 AM

    Add a comment
    10|10000 characters needed characters exceeded

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

    hi

    yes you can use inner join for 3 tables.check this for inner join on 3 tables

    http://www.sap-img.com/abap/inner-joins.htm

    this should help you

    regards

    Aakash Banga

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2008 at 05:11 AM

    Hi Arun,

    There is basically no limit on that. You can use inner joins for 'N' number of tables. But Rememer that join may worse your performance.

    Be careful with inner join, it's a good solution when you have the relation 1<->n but not with relation

    n <-> n.

    Do check this Link for performance analysis.

    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/86a0b490-0201-0010-9cba-fd5c804b99a1

    Thanks

    Nitesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 18, 2008 at 07:48 AM

    thanks for all

    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.