I'm trying to pull a query from SOQL explorer to erase some records. My query is trying to make sure the ID from the opportunity matches the ID for the quote presented (there are several quotes, and the only one used is has the quote ID on the "quote_for_contract" field.
Here's the query:
select Id, Name, Opportunity__r.id, IsSelectedToPresent__c, Opportunity__r.Quote_For_Contract__c from Operator_Quote__c where Id = Opportunity__r.Quote_For_Contract__c AND IsSelectedToPresent__c = false
where Quote_For_Contract__c is the ID. But I receive a binding error as I can't compare fields to see if the ID is the same.
Do I need to implement a formula field to set it to true is the ID is the same and use that field for the query?