You need to sign in to do that
Don't have an account?
ShravanKumarBagam
Aggregate function
hi,
Using count function ,how can i get values of count() or count(fieldname)...
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
hi,
Using count function ,how can i get values of count() or count(fieldname)...
I did not get the Count(fieldName).......
If you want the record Count for the Specific fields . You can Query like this . .
[select Count() from the Object where FieldName__c ! = null];
Thanks
SFDC_Evolve
AggregateResult[] groupedResults= [SELECT count(Amount) FROM Opportunity];
Object avgAmount = groupedResults[0].get('expr0');
integer icount = (integer) avgAmount;
remember : You can't use COUNT() with an ORDER BY clause also You can't use COUNT() with a GROUP BY
but u can make use when you can use a GROUP BY clause with COUNT(fieldName)