I have an object called Child__c, which has two lookups to Account called Account_Lookup_1__c and Account_Lookup_2__c.
I have the following SOQL query, which works as you'd expect it would
select Id
from Account
where Id in (select Account_Lookup_1__c from Child__c) and
Id in (select Account_Lookup_2__c from Child__c)
But I cannot do it with an OR, which is what I really want:
select Id
from Account
where Id in (select Account_Lookup_1__c from Child__c) or
Id in (select Account_Lookup_2__c from Child__c)
Thanks to this error:
Semi join sub-selects are not allowed with the 'OR' operator
Are there any hacky SOQL workarounds to this, or do I need to look at selecting them separately and manually merging?