You need to sign in to do that
Don't have an account?
Frances Wotton
Syntax error for Apex trigger -
Am getting error from the following - can anyone advise correct syntax for subtracting two sum amounts, many thanks
Error: Compile Error: Missing 'SELECT' at 'sum' at line 35 column 50
for(AggregateResult q : [select Project__c, (sum(Amount) - sum(npe01__Amount_Outstanding__c) )
from Opportunity where (StageName = 'Complete - Won' or StageName = 'Agree Payment Schedule' or StageName = 'Sign Contract'
or StageName = 'Pledged' or StageName = 'Funding approved') and Project__c != null and Project__c IN :ProjectIds group by Project__c])
Error: Compile Error: Missing 'SELECT' at 'sum' at line 35 column 50
for(AggregateResult q : [select Project__c, (sum(Amount) - sum(npe01__Amount_Outstanding__c) )
from Opportunity where (StageName = 'Complete - Won' or StageName = 'Agree Payment Schedule' or StageName = 'Sign Contract'
or StageName = 'Pledged' or StageName = 'Funding approved') and Project__c != null and Project__c IN :ProjectIds group by Project__c])
Try the below code:
Thanks.
All Answers
You can not do that in a query. For that, you need to query them and then perform the operation on it. Like below:
Let me know if it helps you out. And mark it as best.
Thanks
Naresh Y.
Try the below code:
Thanks.