You need to sign in to do that
Don't have an account?
prabhakar r 3
iterable example .Total salry of(6000) all records.and batch size is 3000 how we can write in iterabl
How we can get if 6000 records-salry can adding.Total salry of all records.and batch size is 3000 how we can write in iterable
Please Help Me...
Please Help Me...
Prabhakar,
You can do this in a batch, if you implement the Database.Stateful interface. That being said, if you're only running through 6000 records, a simple Apex class that does a SOQL query and sums up the values should be sufficient.
For the batch scenario, Salesforce docs has an example of exactly what you're looking for here: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm (See the Database.Stateful example)