<?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: Select MAX not working properly in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886573#M1961095</link>
    <description>&lt;P&gt;Read and analyze your code.&lt;/P&gt;&lt;P&gt;You are selecting the max value QMNUM inside a group formed by QMNUM, so, basically, you are doing a select single.. since QMNUM is the split criteria.&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2019 15:44:37 GMT</pubDate>
    <dc:creator>SimoneMilesi</dc:creator>
    <dc:date>2019-05-24T15:44:37Z</dc:date>
    <item>
      <title>Select MAX not working properly</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886571#M1961093</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I am writing the following select statement and it is returning wrong value.&lt;/P&gt;
  &lt;P&gt;Select max( QMNUM ) from QMEL into (lv_qmnum) groupby qmnum.&lt;/P&gt;
  &lt;P&gt;Is it because the field qmnum is of type char. I also tried without groupby.&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;Vinod.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 13:44:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886571#M1961093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-05-24T13:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select MAX not working properly</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886572#M1961094</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you should used Select group by otherwise it will be wrong anyway. &lt;/P&gt;&lt;P&gt;If you used aggregate function like(SUM,MAX....) with the group by you have to put rest of the field with group by close  . I mean rest of the all field with group by.&lt;/P&gt;&lt;P&gt;"DEPT", SUM("SALARY") from"KABIL_PRACTICE"."DEMO_EMP"Groupby"DEPT";&lt;/P&gt;&lt;P&gt;"here with group by you have to put only 'DEPT' not SALARY. because SALARY goes with aggregate function. &lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/viewer/7c78579ce9b14a669c1f3295b0d8ca16/Cloud/en-US/0579a6540e89468998e0ecfaff69acb0.html"&gt;https://help.sap.com/viewer/7c78579ce9b14a669c1f3295b0d8ca16/Cloud/en-US/0579a6540e89468998e0ecfaff69acb0.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nawa.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 14:24:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886572#M1961094</guid>
      <dc:creator>Nawanandana</dc:creator>
      <dc:date>2019-05-24T14:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select MAX not working properly</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886573#M1961095</link>
      <description>&lt;P&gt;Read and analyze your code.&lt;/P&gt;&lt;P&gt;You are selecting the max value QMNUM inside a group formed by QMNUM, so, basically, you are doing a select single.. since QMNUM is the split criteria.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 15:44:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886573#M1961095</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2019-05-24T15:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select MAX not working properly</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886574#M1961096</link>
      <description>&lt;P&gt;I don't have any error with the code you mention, and it does what any SQL developer would expect. A character field is not an issue for MAX:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lv_qmnum TYPE qmel-qmnum.
SELECT MAX( qmnum ) FROM qmel INTO (lv_qmnum).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 May 2019 19:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886574#M1961096</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-24T19:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Select MAX not working properly</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886575#M1961097</link>
      <description>&lt;P&gt;how wrong it return?&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 12:01:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-max-not-working-properly/m-p/11886575#M1961097</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-05-25T12:01:41Z</dc:date>
    </item>
  </channel>
</rss>

