I have two objects with Master-Detail relationship between them where Phase is Master Object and Phase Entity is Child object.I am trying to compare the data(field values) in eclipse.But I am getting an error Bind variables only allowed in apex code.

How to compare data(field values) between master and child objects?

Select e.Fund__c, e.Phase__r.Fund__c, e.Phase__c From  Phase_Entity__c e where e.Phase__r.Fund__c != e.Fund__c

SOQL won't let you compare fields within a query. You'll need to make a checkbox formula field on Phase_Entity__c.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.