<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: complex nested inner joins in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055986#M723790</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Smitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use For all entries instead of Inner Join and get data seperately from each table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2007 16:54:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-20T16:54:07Z</dc:date>
    <item>
      <title>complex nested inner joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055985#M723789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a select statement with a complex structure of inner joins. This is how my select statement is written-&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;SELECT DISTINCT&lt;/P&gt;&lt;P&gt;    s1~/bic/ghaprod5&lt;/P&gt;&lt;P&gt;    s2~/bic/ghaprod7&lt;/P&gt;&lt;P&gt;    s3~/bi0/9alocno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INTO TABLE&lt;/P&gt;&lt;P&gt;    tb_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FROM&lt;/P&gt;&lt;P&gt;    /bic/fhakc_ofc AS f&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INNER JOIN&lt;/P&gt;&lt;P&gt;    /bic/dhakc_ofc1 AS d1&lt;/P&gt;&lt;P&gt;          ON f&lt;SUB&gt;key_hakc_ofc1 EQ d1&lt;/SUB&gt;dimid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INNER JOIN&lt;/P&gt;&lt;P&gt;      /bic/dhakc_ofc3 AS d3&lt;/P&gt;&lt;P&gt;        ON f&lt;SUB&gt;key_hakc_ofc3 EQ d3&lt;/SUB&gt;dimid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INNER JOIN&lt;/P&gt;&lt;P&gt;      /bic/sghaprod5 AS s1&lt;/P&gt;&lt;P&gt;        ON d1&lt;SUB&gt;sid_ghaprod5 EQ s1&lt;/SUB&gt;sid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INNER JOIN&lt;/P&gt;&lt;P&gt;      /bic/sghaprod7 AS s2&lt;/P&gt;&lt;P&gt;        ON d1&lt;SUB&gt;sid_ghaprod7 EQ s2&lt;/SUB&gt;sid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INNER JOIN&lt;/P&gt;&lt;P&gt;      /bi0/9aslocno AS s3&lt;/P&gt;&lt;P&gt;        ON d3&lt;SUB&gt;sid_9alocno EQ s3&lt;/SUB&gt;sid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INNER JOIN&lt;/P&gt;&lt;P&gt;     /bic/pghaprod7 AS p1&lt;/P&gt;&lt;P&gt;        ON s1&lt;SUB&gt;/bic/ghaprod5 EQ p1&lt;/SUB&gt;/bic/ghaprod5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHERE&lt;/P&gt;&lt;P&gt;      p1~/bic/ghaplev1 IN s_ba&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;   ORDER BY&lt;/P&gt;&lt;P&gt;      s1~/bic/ghaprod5&lt;/P&gt;&lt;P&gt;      s2~/bic/ghaprod7&lt;/P&gt;&lt;P&gt;      s3~/bi0/9alocno .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following problem-&lt;/P&gt;&lt;P&gt;If I use only the final where condition on the table /bic/pghaprod7, a particular record with /bic/ghaprod5 = 109246507 is not pulled into the destination table (This is the desired result as this record does not satisfy the where condition). However, if I use this complex select statement(along with the final where condition) the destination table has the record with /bic/ghaprod5 = 109246507. Why is this happening? Isn't the where condition being applied to the final result in the destination table? &lt;/P&gt;&lt;P&gt;Any help on this will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Smitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 16:33:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055985#M723789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T16:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: complex nested inner joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055986#M723790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Smitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use For all entries instead of Inner Join and get data seperately from each table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 16:54:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055986#M723790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T16:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: complex nested inner joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055987#M723791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should try an OUTER JOIN for that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 17:05:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055987#M723791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T17:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: complex nested inner joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055988#M723792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. An outer join on which table should be done to get the desired result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Smitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 18:30:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055988#M723792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T18:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: complex nested inner joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055989#M723793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I misread your question. I thought you were not getting it in the JOIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference in performance between JOINs and FOR ALL ENTRIES is not that great. I find FOR ALL ENTRIES to be easier to use and it's (to me) clearer what's going on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you may want to try the ealrier suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 18:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/complex-nested-inner-joins/m-p/3055989#M723793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T18:53:22Z</dc:date>
    </item>
  </channel>
</rss>

