<?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 COUNT(*) error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768379#M1584325</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried other ways including declaring variable of size numeric 20 but still it goes for dump !!!!!&lt;/P&gt;&lt;P&gt;If SQL can process the value more than INT4 limit in COUNT(*) then definitely SAP would have some way to process.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Apr 2011 12:22:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-04-12T12:22:58Z</dc:date>
    <item>
      <title>SELECT COUNT(*) error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768375#M1584321</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;I am facing a problem while executing select count(*) into v_count from &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;P&gt;Table contains more than 3000 crore &lt;EM&gt;(= 30 billion !)&lt;/EM&gt; records so the select statement is failing, i think count(*) is crossing INT4 value limit.&lt;/P&gt;&lt;P&gt;Please let me know if we can find count(*) value of more than INT4 limit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Munish Garg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please do not use local naming conventions.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Apr 12, 2011 6:36 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 10:10:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768375#M1584321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-12T10:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT COUNT(*) error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768376#M1584322</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INT4 can store numbers between -2.147.483.648 and +2.147.483.647 ;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your count would be more than 10x to big (if I didn't fail to count the zeros correctly). -&amp;gt; Archiving? You might count for partial keys and add the numbers of several selects... I guess the count( * ) restriction is not only the local variable, but also early on the way from DB to ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 10:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768376#M1584322</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2011-04-12T10:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT COUNT(*) error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768377#M1584323</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;You can define the type N to hold value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following example will help you to understand well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: lv_numc(20) type n.
select single count(*) into lv_numc
from mara.
write: lv_numc.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 10:42:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768377#M1584323</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2011-04-12T10:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT COUNT(*) error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768378#M1584324</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;in help (F1) of select - aggregates it says, the result of function count is of type INT4 and the variable should be defined accordingly -&amp;gt; this approach shouldn't work.&lt;/P&gt;&lt;P&gt;In a program, only partial counts would be possible, manually you can have a look with transactions DB02, DB20 or DB6STATS (depending on your release, that's all the same).&lt;/P&gt;&lt;P&gt;By the way: also SE16 would throw this error, isn't it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 11:26:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768378#M1584324</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2011-04-12T11:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT COUNT(*) error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768379#M1584325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried other ways including declaring variable of size numeric 20 but still it goes for dump !!!!!&lt;/P&gt;&lt;P&gt;If SQL can process the value more than INT4 limit in COUNT(*) then definitely SAP would have some way to process.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 12:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768379#M1584325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-12T12:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT COUNT(*) error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768380#M1584326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you really want help, you're going to have to let us know what the dump says.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 13:23:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-count-error/m-p/7768380#M1584326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-12T13:23:52Z</dc:date>
    </item>
  </channel>
</rss>

