Skip to main content
global class accbatch implements Database.Batachable<sobject>

 

{

 

global Database.Querylocator start(Database.Batchablecontext bc)

 

{

 

string query;

 

query= ('select id,name from account where createdate >=today');

 

system.debug('+++++++'+query);

 

return Database.getQuerylocator(query);

 

global void execute(Database.Batchablecontext bc,List<Account> acc)

 

{

 

deleate acc;

 

}

 

global void finish(Database.Batchablecontext bc){

 

}

 

}
6 个回答
  1. 2014年10月10日 05:26
    There is also an error in your soql. What is the condition you are checking in soql? Is that create date a custom field  or if its a standard, then it should be CreatedDate.
0/9000