I have a batch class where would like to add few condition in the query,how to add them.Any Suggestion please.
1)I would like to add more roles (such as EB ,TA ,RA etc where role is a picklist field) in this query .
SELECT Contract__c FROM Contract_role__c WHERE Role__c = 'SA'
2)In getquerylocator i would like to add few condition such as
When "Renewed" is Checked AND When "SRR" is YES AND when the "Status Renewed" is equal to "Status renewed for next quarter " or "Pipeline" AND when "Status Renewed next Year" is not equal to "Renewed" or"Renewed lost"
i have the query as
return Database.getQueryLocator('Select id, Contract_Name__c , EndDate ,ownerId FROM Contract WHERE Id IN: setContractIds');
Any Suggestion please.