<?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 select with aggregate function MAX in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202598#M1376287</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;Can I write a query like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1 field2 MAX( field3 )&lt;/P&gt;&lt;P&gt;from z_table&lt;/P&gt;&lt;P&gt;into table itab &lt;/P&gt;&lt;P&gt;for all entries in itab2&lt;/P&gt;&lt;P&gt;where field1 = itab2-field1&lt;/P&gt;&lt;P&gt;     and field2 = itab2-field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above case all the 3 fields are key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2009 06:32:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-06T06:32:59Z</dc:date>
    <item>
      <title>select with aggregate function MAX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202598#M1376287</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;Can I write a query like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1 field2 MAX( field3 )&lt;/P&gt;&lt;P&gt;from z_table&lt;/P&gt;&lt;P&gt;into table itab &lt;/P&gt;&lt;P&gt;for all entries in itab2&lt;/P&gt;&lt;P&gt;where field1 = itab2-field1&lt;/P&gt;&lt;P&gt;     and field2 = itab2-field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above case all the 3 fields are key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 06:32:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202598#M1376287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-06T06:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: select with aggregate function MAX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202599#M1376288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why dont you try to execute it and check if its working?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 06:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202599#M1376288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-06T06:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: select with aggregate function MAX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202600#M1376289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &lt;SPAN __jive_macro_name="field1"&gt;&lt;/SPAN&gt;, max(&lt;SPAN __jive_macro_name="field2"&gt;&lt;/SPAN&gt;) as field2, min(&lt;SPAN __jive_macro_name="field3"&gt;&lt;/SPAN&gt;) as field3, ...&lt;/P&gt;&lt;P&gt;from........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 06:40:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202600#M1376289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-06T06:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: select with aggregate function MAX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202601#M1376290</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;I did try it.. but got an error like: "The field "z_table~field2" from the select list is missing in the GROUP BY clause" but my aggregate funtion is used only for the field3..... So, I wanted to know if anybody has come across such a query....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 06:43:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202601#M1376290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-06T06:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: select with aggregate function MAX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202602#M1376291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there is only one max function in the select you do not need a group by. In your case, you need one. But this was told you by the compiler....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 06:46:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202602#M1376291</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-06T06:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: select with aggregate function MAX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202603#M1376292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check online help for aggregate functions. All selected columns which are not used as aggregate functions must appear in the GROUP BY clause.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 06:48:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202603#M1376292</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-10-06T06:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: select with aggregate function MAX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202604#M1376293</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;The code works fine after the group by clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sindhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 07:07:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-aggregate-function-max/m-p/6202604#M1376293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-06T07:07:56Z</dc:date>
    </item>
  </channel>
</rss>

