<?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 Open SQL - using string function in JOIN clause in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-using-string-function-in-join-clause/m-p/682673#M30429</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;
  &lt;P&gt;I'm writing an open sql query and I should use a string function in the JOIN/ON clause, but Hana Studio gives error. &lt;/P&gt;
  &lt;P&gt;The join should be like this:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;LEFT OUTER JOIN T024 AS t3
ON RIGHT(t3~EKGRP,2) = t2~FRGC1 &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;and the error is: "A Boolean expression is required in positions starting with RIGHT(T3~EKGRP." &lt;/P&gt;
  &lt;P&gt;If I try to use a concatenation operator I get another error: &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;LEFT OUTER JOIN T024 AS t3
ON t3~EKGRP like ('S' || t2~FRGC1) &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;the error is: "(" is invalid here (due to grammar). contains an invalid character or it is a &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;The strange thing is that both ways run well if I use the sql script inside a sql Client like DBeaver. &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;How can I arrange my join? &lt;/P&gt;
  &lt;P&gt;Is there a way to write standard sql inside an Abap program? &lt;/P&gt;
  &lt;P&gt;Or should I perform the join outside the open sql script? &lt;/P&gt;
  &lt;P&gt;Best regards &lt;/P&gt;
  &lt;P&gt;LK&lt;/P&gt;</description>
    <pubDate>Wed, 17 Oct 2018 10:28:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-10-17T10:28:50Z</dc:date>
    <item>
      <title>Open SQL - using string function in JOIN clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-using-string-function-in-join-clause/m-p/682673#M30429</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;
  &lt;P&gt;I'm writing an open sql query and I should use a string function in the JOIN/ON clause, but Hana Studio gives error. &lt;/P&gt;
  &lt;P&gt;The join should be like this:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;LEFT OUTER JOIN T024 AS t3
ON RIGHT(t3~EKGRP,2) = t2~FRGC1 &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;and the error is: "A Boolean expression is required in positions starting with RIGHT(T3~EKGRP." &lt;/P&gt;
  &lt;P&gt;If I try to use a concatenation operator I get another error: &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;LEFT OUTER JOIN T024 AS t3
ON t3~EKGRP like ('S' || t2~FRGC1) &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;the error is: "(" is invalid here (due to grammar). contains an invalid character or it is a &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;The strange thing is that both ways run well if I use the sql script inside a sql Client like DBeaver. &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;How can I arrange my join? &lt;/P&gt;
  &lt;P&gt;Is there a way to write standard sql inside an Abap program? &lt;/P&gt;
  &lt;P&gt;Or should I perform the join outside the open sql script? &lt;/P&gt;
  &lt;P&gt;Best regards &lt;/P&gt;
  &lt;P&gt;LK&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 10:28:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-using-string-function-in-join-clause/m-p/682673#M30429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-17T10:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Open SQL - using string function in JOIN clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-using-string-function-in-join-clause/m-p/682674#M30430</link>
      <description>&lt;P&gt;you can use like in ON condition but the right side must be character, and as far as i know there is no character expression could do what you are trying to do...&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 15:12:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-using-string-function-in-join-clause/m-p/682674#M30430</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2018-10-17T15:12:53Z</dc:date>
    </item>
  </channel>
</rss>

