<?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 Select command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261292#M490143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any other select command to fetch data from single row like SELECT SINGLE. What is the diffrence between these commands?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 May 2007 06:19:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-13T06:19:41Z</dc:date>
    <item>
      <title>Select command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261292#M490143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any other select command to fetch data from single row like SELECT SINGLE. What is the diffrence between these commands?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2007 06:19:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261292#M490143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-13T06:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Select command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261293#M490144</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 UPTO 1 row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to the help documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference you can see in the help documentation of the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Baburaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2007 06:54:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261293#M490144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-13T06:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Select command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261294#M490145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi khan,&lt;/P&gt;&lt;P&gt;the query which is used to fetch single row from data base table alternative to SELECT SINGLE is SELECT UPTO 1 ROW....&lt;/P&gt;&lt;P&gt;The SELECT UPTO 1 ROW query also returns single data from database table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the difference between both query is that SELECT SINGLE should be used when u have only KEY FIELDS in the where clause...&lt;/P&gt;&lt;P&gt;in case of SELECT UPTO 1 ROW....there is no need of having KEY FIELDS in the where clause...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this would solve ur problem...reward pts incase usefull&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2007 15:25:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261294#M490145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-13T15:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261295#M490146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to get single record from data base tables ,then use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single * from table into wa-area &lt;/P&gt;&lt;P&gt;                              where key field is manadtory ( if you do not specify the key field then it would be performance issue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd command ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from table into wa_table up to 1 row&lt;/P&gt;&lt;P&gt;                           where field = condition ) key field is not mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : if you do not have key field ,then use always select * from table into table up to 1 row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if it is useful&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>Sun, 13 May 2007 17:54:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261295#M490146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-13T17:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Select command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261296#M490147</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;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2007 18:46:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261296#M490147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-13T18:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261297#M490148</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;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;&lt;/P&gt;&lt;P&gt;Mainly: to check if entries exist. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;Haritha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 03:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261297#M490148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T03:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261298#M490149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi khan&lt;/P&gt;&lt;P&gt;   Select single * from table where&amp;lt;condition&amp;gt;.=&amp;gt;this stmt is used to select the first row of the table according to the condition specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but,&lt;/P&gt;&lt;P&gt;  Select upto 1row from table where&amp;lt;condition&amp;gt;.=&amp;gt; this stmt is used to select the first row and it applies aggregation function on it and at last retreives the first row of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IT PLEASE..!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 07:57:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261298#M490149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T07:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261299#M490150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select upto 1row from table where&amp;lt;condition&amp;gt;.=&amp;gt; this stmt is used to select the first row and it applies aggregation function on it and at last retreives the first row of the table.&lt;/P&gt;&lt;P&gt;What exactly the aggregation function applies? Any example.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 14:27:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-command/m-p/2261299#M490150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-21T14:27:14Z</dc:date>
    </item>
  </channel>
</rss>

