Skip to main content
Hello there, Need help to get help on following, I was Parent data comparinf with child data, my query look like this:

 

Select ParentId, parentfield from Parent where parentfield NOT IN ( select childfield from child where parent.id = child.id)

 

​Any advise?
6 answers
  1. Jun 30, 2015, 8:25 PM

    NON-programmatic solution: Since soql doesn't allow field-to-field comparison you can create a Boolean type formula field (e.g. Comparison__c) in child object with the following formula:

    IF(Parent__r.Parentfield==Childfield, True, False)

     

    then you can reference this in you query as:

     

     

    Where Comparision__c=true

0/9000