
2 answers
Hi Ravinder, I have gone through your code. I traced the error that you have made. First, in Database.getQueryLocator we have to give any input as a string after that it converts that string into a query. So I have modified your code. please have a look.global class batchclass { global Database.QueryLocator start(Database.BatchableContext bc){ return Database.getQueryLocator('SELECT Id,Email,name,MailingCountry,active__C,Flag__c,Chrun_Indicator__c,Sales_Program_Type__c FROM Contact where AccountId!= null and Account.Active__c=\'Yes\' and ( Account.Type like \'Customer%\')and Active__c=\'Yes\' and Email!= null and (NOT Email like \'%cexz.com\')'); }}Hope this explanation will resolve your query. Mark it as the best answer if you find it helpful.ThanksAkshay