Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
up vote 7 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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