<?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: Difference between Select Single and Select upto 1 row in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593515#M266775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In select single u will have to give all the key fields match&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where as in select upto 1 row will fetch u the first record based on condition if not it does not give u a record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;- Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Oct 2006 09:24:10 GMT</pubDate>
    <dc:creator>gopi_narendra</dc:creator>
    <dc:date>2006-10-05T09:24:10Z</dc:date>
    <item>
      <title>Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593511#M266771</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;Please tell me when to use SELECT SINGLE and when to use SELECT UP TO one rows?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want any theoritical answer but the practical and technical explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 09:17:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593511#M266771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T09:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593512#M266772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi subhash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. For practical purpose, there is no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I would personaly prefer&lt;/P&gt;&lt;P&gt;   select SINGLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (Bcos UPTO 1 Rows does not make sense,&lt;/P&gt;&lt;P&gt;  moreover, select single is easy to read,&lt;/P&gt;&lt;P&gt;  and less confusing)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 09:20:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593512#M266772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T09:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593513#M266773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;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;&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 '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;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;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha Deshmukh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Plz mark useful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 09:20:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593513#M266773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T09:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593514#M266774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Subhash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls refer this thread for a good example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/difference-between-select-single-and-up-to-1-row.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/difference-between-select-single-and-up-to-1-row.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. mark points for helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 09:21:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593514#M266774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T09:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593515#M266775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In select single u will have to give all the key fields match&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where as in select upto 1 row will fetch u the first record based on condition if not it does not give u a record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;- Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 09:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593515#M266775</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2006-10-05T09:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593516#M266776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check out these links they should be what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FAQ's have good answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/library/uuid/840ad679-0601-0010-cd8e-9989fd650822" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/library/uuid/840ad679-0601-0010-cd8e-9989fd650822&lt;/A&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="105226"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 09:24:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593516#M266776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T09:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593517#M266777</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;One more small difference is,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In &amp;lt;b&amp;gt;SELECT SINGLE&amp;lt;/b&amp;gt; if u dont write any where condition it wil fetch data 10msec compare to &amp;lt;b&amp;gt;SELECT upto 1 row.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;If u mension &amp;lt;b&amp;gt;where&amp;lt;/b&amp;gt; condition in select sigle it is more faster than select upto 1 row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pradhan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 09:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593517#M266777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T09:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593518#M266778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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 &lt;/P&gt;&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns &lt;/P&gt;&lt;P&gt;the first record of the result set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difference is select upto 1 row will select all the records in that condition and then does some grouping or sorting and then outputs the record. Takes more time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But select single selects the forst row which meets that condition and gives the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details check blogs there is an article.&lt;/P&gt;&lt;P&gt;Keyword Performance tuning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 09:29:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593518#M266778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T09:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593519#M266779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soni,&lt;/P&gt;&lt;P&gt;       Select single only will give the better performance and also one thing u need to remember that If you are using select sinle You have give the full primary key(mention all key fields) in the where condition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Vasantha Gutta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 11:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593519#M266779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T11:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Select Single and Select upto 1 row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593520#M266780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Subhash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have got answers to your query you need to mark useful answers and close the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha Deshmukh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 11:53:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-select-single-and-select-upto-1-row/m-p/1593520#M266780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T11:53:01Z</dc:date>
    </item>
  </channel>
</rss>

