function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
prasanth kumarprasanth kumar 

unexpceted token where  error. in batch apex

hi,  i am getting    "unexpceted token where  error."      please solve this. 

Date dte = Date.today().addDays(-2);
      
         String Name ='dell ';
       String ActName ='Activity ';
       
return database.getquerylocator('select id,name__c,name__c,Project_Name__c from customerstatus__c where End_date__c staus__c !=\''+Name+'\' and type__c=\''+ActName+'\' where actual_End_date__c =: dte '
Naval Sharma4Naval Sharma4
Hi Prasanth,

Your query is having syntax error. Could you let us know your requirements?
prasanth kumarprasanth kumar
i want to retrive the records  where the  staus__c ='dell'  and   type__c=áctivity' and actual end date =  2 days from before.
Abhi_TripathiAbhi_Tripathi
Try using this 
 
return database.getquerylocator('select id,name__c,name__c,Project_Name__c from customerstatus__c where End_date__c staus__c !=' + '\'dell\'' + and type__c= + '\'Activity\''+ 'and actual_End_date__c =: dte ');