<?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: This select is good ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399505#M10135</link>
    <description>&lt;P&gt;Thank you for the information. Do you have any information on the performance impacts versus a sub-query?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Dec 2016 19:57:51 GMT</pubDate>
    <dc:creator>raghug</dc:creator>
    <dc:date>2016-12-19T19:57:51Z</dc:date>
    <item>
      <title>This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399498#M10128</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;SELECT usr~usrnam  FROM sosu INNERJOIN soud AS sub ON sosu~subno = sub~usrno                                  AND sosu~subyr = sub~usryr                                  AND sosu~subtp = sub~usrtp            INNERJOIN soud AS usr ON sosu~usrno = usr~usrno                                  AND sosu~usryr = usr~usryr                                  AND sosu~usrtp = usr~usrtp  WHERE sub~usrnam = is_frontend-front_userid    AND sosu~proti = c_checked    AND sosu~proto = c_checked    AND(( sosu~sbdat &amp;lt;sy-datum AND sosu~sedat &amp;gt;sy-datum )OR( sosu~sbdat =sy-datum AND sosu~sbtim &amp;lt;sy-uzeit )OR( sosu~sedat =sy-datum AND sosu~setim &amp;gt;sy-uzeit )).IFsy-subrc EQ0.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Dec 2016 12:33:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399498#M10128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-15T12:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399499#M10129</link>
      <description>&lt;P&gt;I would try a more readily understandable code like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;      AND ( sosu~sbdat LT sy-datum OR ( sosu~sbdat EQ sy-datum AND sosu~sbtim LT sy-uzeit ) )  " from 
      AND ( sosu~sedat GT sy-datum OR ( sosu~sedat EQ sy-datum AND sosu~setim GT sy-uzeit ) ). " to&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also correct typos in your code...&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Raymond&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 12:53:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399499#M10129</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2016-12-15T12:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399500#M10130</link>
      <description>&lt;P&gt;Not sure what exactly is definition of "good" here but in addition to what Raymond said - if you're using aliases at least chose more descriptive names. USR and SUB are too cryptic.&lt;/P&gt;&lt;P&gt;And INNER is default JOIN, so simply JOIN is sufficient. But the short form is just my personal preference, others could be in favor of the full form.&lt;/P&gt;&lt;P&gt;The potential performance is another story. I don't know these tables by heart but hopefully you've already checked if you're using the key fields as appropriate.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 23:01:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399500#M10130</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2016-12-15T23:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399501#M10131</link>
      <description>&lt;P&gt;I tried laying this code out I think as you intended in a text editor and came up with this...&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/11498-2016-12-16-11-41-35.jpg" /&gt;&lt;/P&gt;&lt;P&gt;It looks like what you were trying to ask specifically was the recursive joins with the same table; is that correct? I have never seen that before, what exactly are you trying to achieve here by doing that?&lt;/P&gt;&lt;P&gt;Other suggestions - 1) When you post code, even pseudocode, make sure that you format it so that people can read it without having to reconstruct it like I just did. 2) Rather than just asking - what's wrong with this, ask a specific question about it. This is not a puzzle solving forum or a mind reading forum.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 16:53:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399501#M10131</guid>
      <dc:creator>raghug</dc:creator>
      <dc:date>2016-12-16T16:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399502#M10132</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In some situations, you may find it necessary to join a table to
itself, as though you were joining two separate tables.  This is
referred to as a &lt;EM&gt;self join&lt;/EM&gt;.  In the self join, the combined
result consists of two rows from the same table.&lt;/P&gt;&lt;P&gt;see more: &lt;A href="https://docs.thunderstone.com/site/texisman/joining_a_table_to_itself.html" target="test_blank"&gt;https://docs.thunderstone.com/site/texisman/joining_a_table_to_itself.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Filipe Sardinha&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 17:15:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399502#M10132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-16T17:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399503#M10133</link>
      <description>&lt;P&gt;I agree. The SCN members also can't possibly know if this query is valid for the specific requirement. "Good" is too fuzzy.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 18:59:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399503#M10133</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2016-12-16T18:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399504#M10134</link>
      <description>&lt;P&gt;Ok sry for the format, i don't know why that's didn't work when i check code form.&lt;/P&gt;&lt;P&gt;It's not my code and i just wanted to know if its possible to have (2 innerjoin on the same table) and why its usefull &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ? &lt;/P&gt;&lt;P&gt;Thank's for all the answer&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2016 09:50:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399504#M10134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-19T09:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399505#M10135</link>
      <description>&lt;P&gt;Thank you for the information. Do you have any information on the performance impacts versus a sub-query?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2016 19:57:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399505#M10135</guid>
      <dc:creator>raghug</dc:creator>
      <dc:date>2016-12-19T19:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: This select is good ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399506#M10136</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For example, you have 2 tables both with 20 rows..&lt;/P&gt;&lt;P&gt;on join the operation performed is 20 * 2.&lt;/P&gt;&lt;P&gt;in sub-query is 20 * 20 &lt;/P&gt;&lt;P&gt;join works by concentrating the operation on the result of the first two
 tables, any subsequent joins would concentrate joining on the 
in-memory(or cached to disk) result of the first joined tables, and so 
on. less read-write needle movement.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Filipe Sardinha&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 12:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/this-select-is-good/m-p/399506#M10136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-20T12:06:47Z</dc:date>
    </item>
  </channel>
</rss>

