<?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: Comparing SELECT SINGLE Vs SELECT.. EXIT.. ENDSELECT for getting single row in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214754#M766535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please use select single............&lt;/P&gt;&lt;P&gt;it will give a better performance......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jai.m&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Dec 2007 03:41:16 GMT</pubDate>
    <dc:creator>jayakummar</dc:creator>
    <dc:date>2007-12-19T03:41:16Z</dc:date>
    <item>
      <title>Comparing SELECT SINGLE Vs SELECT.. EXIT.. ENDSELECT for getting single row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214748#M766529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a database table with 7 key fields. I need to fetch a single row using 4 of the keys.&lt;/P&gt;&lt;P&gt;Which is the best way out of below two and why?&lt;/P&gt;&lt;P&gt;1. select single * from table where key 1 key 2 key 3 key 4 are known.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. select * from table where key 1 key 2 key 3 key 4 are known.&lt;/P&gt;&lt;P&gt;   exit.&lt;/P&gt;&lt;P&gt; end select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Select upto 1 row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 22:22:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214748#M766529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T22:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing SELECT SINGLE Vs SELECT.. EXIT.. ENDSELECT for getting single row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214749#M766530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Performance point of view - Select single is best than others ( Here you get extened sysntx error since you do not have key fields in where clause ,other way use select upto 1 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 22:27:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214749#M766530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T22:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing SELECT SINGLE Vs SELECT.. EXIT.. ENDSELECT for getting single row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214750#M766531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shreyas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you use SELECT * ... END SELECT statement to access your table, the system will access the database for value each time you loop. This will cause the traffic to increase and memory usage. Though you may be using it to select one row but its always good practice to avoid using this searching method unless situation needs you to do so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you use SELECT SINGLE and using KEYS, this will limit the search and keep the memory usage low plus reducing the execution time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definitely SELECT SINGLE will improve your program performance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use performance tool like SE30 or ST05 to check out your SINGLE SEARCH...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope my explanation is correct. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William Wilstroth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 00:17:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214750#M766531</guid>
      <dc:creator>Wil_Wilstroth</dc:creator>
      <dc:date>2007-12-19T00:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing SELECT SINGLE Vs SELECT.. EXIT.. ENDSELECT for getting single row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214751#M766532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, some days ago, I have the same problem, and I found an article in the WIKI   : [ Difference between select single and select upto.|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/difference%2bbetween%2bselect%2bsingle%2band%2bselect%2bupto.]. Hope this can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that article, the author compares the difference between SELECT SINGLE and SELECT UP TO, and I think 'SELECT SINGLE' and 'SELECT * .EXIT. ENDSELECT. ' have the same effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;feng.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 01:43:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214751#M766532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T01:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing SELECT SINGLE Vs SELECT.. EXIT.. ENDSELECT for getting single row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214752#M766533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shreyas,&lt;/P&gt;&lt;P&gt;SELECT SINGLE is the best way to go here(in view of performance!!!)&lt;/P&gt;&lt;P&gt;Please try to include the other key fields(complete key) in the WHERE clause&lt;/P&gt;&lt;P&gt;to fetch the unique entry exactly!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark all useful answers!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 02:20:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214752#M766533</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2007-12-19T02:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing SELECT SINGLE Vs SELECT.. EXIT.. ENDSELECT for getting single row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214753#M766534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TOPIC :-  Use select up to 1 rows instead of select single. &lt;/P&gt;&lt;P&gt;TIP :- &lt;/P&gt;&lt;P&gt;Its very usefull to use select upto 1 rows instead select single statement, &lt;/P&gt;&lt;P&gt;For example you can check it out with this code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  z_test1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ls1 type sflight-fldate, &lt;/P&gt;&lt;P&gt;      ls2 type sflight-fldate, &lt;/P&gt;&lt;P&gt;      a type i, &lt;/P&gt;&lt;P&gt;      b type i, &lt;/P&gt;&lt;P&gt;      c type i. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get run time field a. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single fldate &lt;/P&gt;&lt;P&gt;       from  sflight &lt;/P&gt;&lt;P&gt;       into ls1 &lt;/P&gt;&lt;P&gt;       where carrid = 'LH' and connid eq '400'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get run time field b. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c = b - a. &lt;/P&gt;&lt;P&gt;write:/ 'runtime for select single:',c. &lt;/P&gt;&lt;P&gt;write:/ ls1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get run time field a. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select fldate &lt;/P&gt;&lt;P&gt;       from  sflight &lt;/P&gt;&lt;P&gt;       into ls2 &lt;/P&gt;&lt;P&gt;       up to 1 rows &lt;/P&gt;&lt;P&gt;       where carrid = 'LH' and connid eq '400'. &lt;/P&gt;&lt;P&gt;endselect. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get run time field b. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c = b - a. &lt;/P&gt;&lt;P&gt;write:/ 'runtime for upto 1 rows:',c. &lt;/P&gt;&lt;P&gt;write:/ ls2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful.........&lt;/P&gt;&lt;P&gt;Minal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 02:52:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214753#M766534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T02:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing SELECT SINGLE Vs SELECT.. EXIT.. ENDSELECT for getting single row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214754#M766535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please use select single............&lt;/P&gt;&lt;P&gt;it will give a better performance......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jai.m&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 03:41:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-select-single-vs-select-exit-endselect-for-getting-single-row/m-p/3214754#M766535</guid>
      <dc:creator>jayakummar</dc:creator>
      <dc:date>2007-12-19T03:41:16Z</dc:date>
    </item>
  </channel>
</rss>

