You need to sign in to do that
Don't have an account?
Developer_shaan
Too many query rows exception in aggregate function implementation
Hi,
error while using aggregate function.
System.LimitException: Too many query rows: 58309
SELECT SUM(RI_Production_Goals_Next_Year__c) FROM Contact WHERE recordtypeid = '012400000005OLAAA2'
how to avoid this??
Hi,
You need to limit the number of records by specifying the limit or include some more filters like recordtype.
Thanks
Thanks for the reply surekha,
i have tried it using limit and the group by and order by clauses in SOQL query.
SELECT id, SUM(RI_Production_Goals_Next_Year__c) FROM Contact WHERE recordtypeid = '012400000005OLAAA2' group by id Limit 1000
but now tyeh error is:
System.UnexpectedException: Internal Salesforce.com Query Error
please let me know whats wrong with the query??
I also tried using order by and group clause to gether but the same error is being thrown.
Thanks
shaan
Have you found any soln for this.
Limit s not working properly when applied on queries with aggragate functions.
The same problem.
I have ~2000 accounts
Simple query [SELECT count() FROM Account]; in test method throwing Too many query rows: 501