You need to sign in to do that
Don't have an account?
![doe doe](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
SOQL issue
Please help in the following query
Child object child1 has a master detail relationship with both master1 and master2
The following query does not work for me
SELECT name FROM Child1 Where master1__r.cust1__c = master2__r.cust2__c
I don't think it is possible in SOQL to have right side of where clause as a field from the object.
So, I would suggest querying all the rows, iterate them and find out the rows which has the same value for master 1 & 2.
All Answers
I don't think it is possible in SOQL to have right side of where clause as a field from the object.
So, I would suggest querying all the rows, iterate them and find out the rows which has the same value for master 1 & 2.
Thanks sorna, I would write the iterate logic in Apex after querying all the rows