<?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 Inner Join for Dynamic Select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782487#M1308505</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;  Can some one please help me in rewriting the below select statement where i have to remove the existing table1 by putting a dynamic table name which has the same table structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  select a~zfield1 
           a~zfield2
      from ztab1 as a
       inner join ztab2 as b
           on b~ztab1-zfield3 = a~ztab2-zfield3
     where a~zfield4 = 'A'.

I am looking something as below. But encountering an error when using the below statement
  select a~zfield1 
           a~zfield2
      from (v_ztab1) as a
       inner join ztab2 as b
           on b~ztab1-zfield3 = a~ztab2-zfield3
     where a~zfield4 = 'A'.
    &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  No Separate selects please. Please help me in rewriting the same select statement itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PSK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2009 23:13:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-25T23:13:01Z</dc:date>
    <item>
      <title>Inner Join for Dynamic Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782487#M1308505</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;  Can some one please help me in rewriting the below select statement where i have to remove the existing table1 by putting a dynamic table name which has the same table structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  select a~zfield1 
           a~zfield2
      from ztab1 as a
       inner join ztab2 as b
           on b~ztab1-zfield3 = a~ztab2-zfield3
     where a~zfield4 = 'A'.

I am looking something as below. But encountering an error when using the below statement
  select a~zfield1 
           a~zfield2
      from (v_ztab1) as a
       inner join ztab2 as b
           on b~ztab1-zfield3 = a~ztab2-zfield3
     where a~zfield4 = 'A'.
    &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  No Separate selects please. Please help me in rewriting the same select statement itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PSK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 23:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782487#M1308505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T23:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join for Dynamic Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782488#M1308506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, PSK &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try to put the code INTO ...  in the INNER JOIN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 00:04:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782488#M1308506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T00:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join for Dynamic Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782489#M1308507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are missing the 'INTO'..  I mean where is the resultant going to get stored... Please do the changes..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 04:18:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782489#M1308507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T04:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join for Dynamic Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782490#M1308508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;What error you are getting ?&lt;/P&gt;&lt;P&gt;Also INTO is missing from the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  p&lt;SUB&gt;carrid p&lt;/SUB&gt;connid f&lt;SUB&gt;fldate b&lt;/SUB&gt;bookid&lt;/P&gt;&lt;P&gt;  INTO  TABLE itab&lt;/P&gt;&lt;P&gt;  FROM  ( spfli AS p&lt;/P&gt;&lt;P&gt;            INNER JOIN sflight AS f ON p&lt;SUB&gt;carrid = f&lt;/SUB&gt;carrid AND &lt;/P&gt;&lt;P&gt;                                       p&lt;SUB&gt;connid = f&lt;/SUB&gt;connid    )&lt;/P&gt;&lt;P&gt;             &lt;/P&gt;&lt;P&gt;  WHERE p~cityfrom = 'FRANKFURT' AND &lt;/P&gt;&lt;P&gt;        p~cityto   = 'NEW YORK' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 04:21:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-for-dynamic-select-statement/m-p/5782490#M1308508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T04:21:45Z</dc:date>
    </item>
  </channel>
</rss>

