You need to sign in to do that
Don't have an account?
Mike Tang
I am having problems with a SOQL aggregate query
Hello, I am having problems with this query producing a Run Time error and I am not sure why. Any help would be appreciated.
List<AggregateResult> quotes = new List<AggregateResult> ();
quotes = [ SELECT Quote.Account.Owner.Name, COUNT (id) FROM Quote WHERE Scheduled_Phone_Interview__c=THIS_MONTH GROUP BY Quote.Account.Owner.Name ];
for (AggregateResult quote:quotes){
//Do something
}
It compiles fine but I get a non-discript error:
SQLException in Class.CyberSn.MonthlyReport.<init>: line 24, column 1 Class.CyberSn.<init>: line 3, column 1
Class.CyberSn.MonthlyReport.<init>: line 24, column 1
Class.CyberSn.<init>: line 3, column 1
List<AggregateResult> quotes = new List<AggregateResult> ();
quotes = [ SELECT Quote.Account.Owner.Name, COUNT (id) FROM Quote WHERE Scheduled_Phone_Interview__c=THIS_MONTH GROUP BY Quote.Account.Owner.Name ];
for (AggregateResult quote:quotes){
//Do something
}
It compiles fine but I get a non-discript error:
SQLException in Class.CyberSn.MonthlyReport.<init>: line 24, column 1 Class.CyberSn.<init>: line 3, column 1
Class.CyberSn.MonthlyReport.<init>: line 24, column 1
Class.CyberSn.<init>: line 3, column 1
Pradeep Kumar L.G
Can you post full code?