<?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 statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761542#M329619</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;select min( marks ) from dbtable into v_min.&lt;/P&gt;&lt;P&gt;This will give the lease score.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative way,&lt;/P&gt;&lt;P&gt;select * from db into table itab.&lt;/P&gt;&lt;P&gt;sort itab by marks asc&lt;/P&gt;&lt;P&gt;read table itab into wa index 1.---&amp;gt;Least score&lt;/P&gt;&lt;P&gt;read table itab into wa1 index 2.-&amp;gt;second least score&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Dec 2006 04:43:05 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2006-12-04T04:43:05Z</dc:date>
    <item>
      <title>select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761540#M329617</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;There is a data in a database Table about Marks of 100 Students.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to pick up the Least score from the table and also need to have second least score from the table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to write the Select Statement for this Requirement..???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone give me the syntax..????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 04:37:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761540#M329617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-04T04:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761541#M329618</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;1. select all hundred record to an internal tabel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. sort internaltable in ascending order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. read the index1 and index2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. tats ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;eg code.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select s_name s_marks from ztab &lt;/P&gt;&lt;P&gt;  into table itab_marks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by marks ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*highest mark.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if itab_marks[] is not inital. "this chk is must&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab_marks index 1. "lowest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write itab_marks-name,&lt;/P&gt;&lt;P&gt;        itab_marks-marks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab_marks index 2. "second lowest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write itab_marks-name,&lt;/P&gt;&lt;P&gt;        itab_marks-marks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 04:39:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761541#M329618</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-12-04T04:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761542#M329619</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;select min( marks ) from dbtable into v_min.&lt;/P&gt;&lt;P&gt;This will give the lease score.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative way,&lt;/P&gt;&lt;P&gt;select * from db into table itab.&lt;/P&gt;&lt;P&gt;sort itab by marks asc&lt;/P&gt;&lt;P&gt;read table itab into wa index 1.---&amp;gt;Least score&lt;/P&gt;&lt;P&gt;read table itab into wa1 index 2.-&amp;gt;second least score&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 04:43:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761542#M329619</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-12-04T04:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761543#M329620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anver and Jayant...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are more than 1 least score (say..Least score is 2.. If 5 guys have scored 2 Marks..), then how to retrive the least scores and second least scores..???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help me out...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 04:48:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761543#M329620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-04T04:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761544#M329621</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;THen use delete adjacent duplicates in itab comparing marks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 04:51:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761544#M329621</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-12-04T04:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761545#M329622</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;chk this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select s_name s_marks from ztab into itab_marks.

sort itab by marks asccending.

*add this statement
DELETE ADJACENT DUPLICATES FROM ITAB_MARKS COMPARING MARKS.

if itab_marks[] is not inital. "this chk is must

read table itab_marks index 1. "lowest

write itab_marks-name,
        itab_marks-marks.


read table itab_marks index 2. "second lowest

write itab_marks-name,
        itab_marks-marks.

endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 05:03:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1761545#M329622</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-12-04T05:03:26Z</dc:date>
    </item>
  </channel>
</rss>

