<?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: INNER JOIN does not support OR operator in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-does-not-support-or-operator/m-p/6214747#M1378206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax of the join conditions join_cond is the same as that of the sql_cond conditions after the addition WHERE, with the following differences: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least one comparison must be specified after ON. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Individual comparisons may be joined using AND only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make two selects &lt;STRONG&gt;adding&lt;/STRONG&gt; the results in the second select to the internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2009 10:24:20 GMT</pubDate>
    <dc:creator>rainer_hbenthal</dc:creator>
    <dc:date>2009-10-06T10:24:20Z</dc:date>
    <item>
      <title>INNER JOIN does not support OR operator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-does-not-support-or-operator/m-p/6214746#M1378205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use inner join with two database tables where the field from the first table can be compare to two fields from the second table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code as follow is syntactically not correct:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT ...
INTO TABLE it_tab
FROM ZTABLE1 as a
INNER JOIN ZTABLE2 as b
  ON a~PK1 = b~F1 OR a~PK1 = b~F2. "Not work&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My work-around is using another temp table with same structure as it_tab. Select data two times then moves from the temp table to the it_tab table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me on how to use INNER JOIN without using another temp table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khanh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 10:17:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-does-not-support-or-operator/m-p/6214746#M1378205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-06T10:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN does not support OR operator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-does-not-support-or-operator/m-p/6214747#M1378206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax of the join conditions join_cond is the same as that of the sql_cond conditions after the addition WHERE, with the following differences: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least one comparison must be specified after ON. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Individual comparisons may be joined using AND only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make two selects &lt;STRONG&gt;adding&lt;/STRONG&gt; the results in the second select to the internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 10:24:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-does-not-support-or-operator/m-p/6214747#M1378206</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-06T10:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN does not support OR operator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-does-not-support-or-operator/m-p/6214748#M1378207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you pressed F1 on join?&lt;/P&gt;&lt;P&gt;&amp;gt;Individual comparisons may be joined using &lt;STRONG&gt;AND only&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i hope its clear that you cannot use the OR condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;better fetch with both conditions 2 times or use &lt;STRONG&gt;FOR ALL ENTRIES&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;first select from ztable1 into table itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from ztabl2 into table itab2
         for all entries in itab1
         where (f1 = itab1-f1 or f1 = itab-f2) .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ways using OR means it will separate the select into two.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 10:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-does-not-support-or-operator/m-p/6214748#M1378207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-06T10:35:22Z</dc:date>
    </item>
  </channel>
</rss>

