<?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: Different result in ABAP Open SQL en HANA SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600487#M1940285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I must admit I was wrong here. But I did not realize there were data in client '000'. We only have access to client '300' via the GUI, but the HANA Studio taught me where the problem actually lies.&lt;/P&gt;&lt;P&gt;Apparently, using a secondary database connection uses implicitly a specific client, as open SQL does.&lt;/P&gt;&lt;P&gt;Thanks for helping and sorry for doubting you.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Kris &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Mar 2016 08:02:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-03-22T08:02:30Z</dc:date>
    <item>
      <title>Different result in ABAP Open SQL en HANA SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600481#M1940279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are upgrading from a Secondary HANA to a Primary and notice a different behaviour in JOIN in SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we use this SQL we get different results in both situations (I only had to change the "." into "~" to make it syntactically correct: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;select&lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;ESTRH.RECNROOT , ESTRH.SUBID , ESTVA.RECNTVH , ESTVA.ORD , ESTVH.ESTCAT , TCG12.ESTNAM , REL.RECNROOT_DST , REL.RECNROOT_SRC&lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;from estrh&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;&lt;STRONG&gt;left outer join&lt;/STRONG&gt; tcgtplrel as rel &lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;on ( rel.recnroot_dst = estrh.recnroot&amp;nbsp;&amp;nbsp; and rel.delflg = ' ' )&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;&lt;STRONG&gt;join&lt;/STRONG&gt; estvh as estvh on ( estvh.recnroot = estrh.recnroot&amp;nbsp;&amp;nbsp; or estvh.recnroot = rel.recnroot_src )&amp;nbsp; and estvh.delflg = ''&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;&lt;STRONG style="color: #ff0000;"&gt;join&lt;/STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt; estva as estva on estva.recntvh = estvh.recn&amp;nbsp;&amp;nbsp; and estva.delflg = ''&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;&lt;STRONG&gt;join&lt;/STRONG&gt; tcg12 as tcg12 on tcg12.estcat = estvh.estcat&amp;nbsp;&amp;nbsp; and langu = 'N'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;where estrh.subid = 'KUL_00001492' &lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt; and estvh.estcat = 'SAP_EHS_1019_003'&lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt; and estrh.delflg = ''&lt;/P&gt;&lt;P style="font-family: Consolas; font-size: 11pt; padding-left: 30px;"&gt;order by TCG12.ESTNAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Formerly on the secondary database (native SQL) and now using Open SQL in ABAP we get &lt;STRONG&gt;4 records&lt;/STRONG&gt; as a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When submitting it as native SQL in HANA as primary we get &lt;STRONG&gt;8 records&lt;/STRONG&gt; as a result. This is due to doubles in the 'red' table &lt;STRONG&gt;ESTVA&lt;/STRONG&gt;. These doubles also exist in the secondary database that still resides on our production system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems as if in the first case, some GROUPING is done. The JOINs are exactly the same in both cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is SQL behaving differently in different situations?&lt;/P&gt;&lt;P&gt;Anyone any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 11:07:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600481#M1940279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-16T11:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Different result in ABAP Open SQL en HANA SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600482#M1940280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that the reason is the implicit client handling you have with Open SQL now. Can you check if the missing records belong to a different client?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 11:16:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600482#M1940280</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2016-03-16T11:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Different result in ABAP Open SQL en HANA SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600483#M1940281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is certainly not the reason, since we have only one client. And I see all lines in transactions SE16H, so they don't come from a different client.&lt;/P&gt;&lt;P&gt;We had that problem previously in our test system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway.&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 11:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600483#M1940281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-16T11:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Different result in ABAP Open SQL en HANA SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600484#M1940282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The delflg (deletion flag?) looks suspicious. &lt;/P&gt;&lt;P&gt;The NULL handling for empty strings ('') is different in pure HANA and in NetWeaver if my memory doesn't fail me.&lt;/P&gt;&lt;P&gt;So that would be what I would be looking for here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 12:50:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600484#M1940282</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2016-03-16T12:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Different result in ABAP Open SQL en HANA SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600485#M1940283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We tried that also. That's not it.&lt;/P&gt;&lt;P&gt;It is a DELETION_FLAG, that is correct and we get the 'correct' result in both cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reaction.&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 13:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600485#M1940283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-16T13:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Different result in ABAP Open SQL en HANA SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600486#M1940284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case, you really should have a look at the actual SQL statement Netweaver issues (ST05 is your friend here).&lt;/P&gt;&lt;P&gt;If that doesn't provide you with enough insight into what's going on it might be worthwhile to involve support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 06:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600486#M1940284</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2016-03-17T06:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Different result in ABAP Open SQL en HANA SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600487#M1940285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I must admit I was wrong here. But I did not realize there were data in client '000'. We only have access to client '300' via the GUI, but the HANA Studio taught me where the problem actually lies.&lt;/P&gt;&lt;P&gt;Apparently, using a secondary database connection uses implicitly a specific client, as open SQL does.&lt;/P&gt;&lt;P&gt;Thanks for helping and sorry for doubting you.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Kris &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 08:02:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-result-in-abap-open-sql-en-hana-sql/m-p/11600487#M1940285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-22T08:02:30Z</dc:date>
    </item>
  </channel>
</rss>

