<?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 single * in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021490#M413753</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;For select single it will select only first record and for upto 1 row it select only the one record based on grouping function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regads,&lt;/P&gt;&lt;P&gt;Sreevani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Mar 2007 14:47:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-05T14:47:30Z</dc:date>
    <item>
      <title>select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021488#M413751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;what is the deference bw select single star and select upto one row.&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;gangireddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 14:45:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021488#M413751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-05T14:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021489#M413752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;difference between select single and select up to 1 row&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1788182"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 14:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021489#M413752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-05T14:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021490#M413753</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;For select single it will select only first record and for upto 1 row it select only the one record based on grouping function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regads,&lt;/P&gt;&lt;P&gt;Sreevani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 14:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021490#M413753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-05T14:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021491#M413754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="401025"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 14:47:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021491#M413754</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-05T14:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021492#M413755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;chk this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="647631"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 14:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021492#M413755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-05T14:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021493#M413756</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 SINGLE: &lt;/P&gt;&lt;P&gt;1. Select single is based on PRIMARY KEY&lt;/P&gt;&lt;P&gt;2. It will take the first record directly without searching of all relevant records.(Though you have lot of records for given condition)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT UPTO 1 ROW : &lt;/P&gt;&lt;P&gt;It will check all records for given condition and take the first record .&lt;/P&gt;&lt;P&gt;It means in select single no searching, where as other searching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, select single more efficient than UPTO 1 ROW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 14:47:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021493#M413756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-05T14:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021494#M413757</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;The select single * from stmt selects only one row form the database table and puts it in to the work area(internal table). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The select upto n(where n stands for a integer number) rows stmt selects all the rows from the database table but writes only the specified number of rows specified by the n into the internal table. If its given as upto 1 rows only 1 row is written in to the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 14:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021494#M413757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-05T14:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021495#M413758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The best way to find out is through sql trace or runtime analysis.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mainly:  to read data from&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.&lt;/P&gt;&lt;P&gt;Mainly: to check if entries exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if it helps u...&lt;/P&gt;&lt;P&gt;sai ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 14:48:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single/m-p/2021495#M413758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-05T14:48:53Z</dc:date>
    </item>
  </channel>
</rss>

