You need to sign in to do that
Don't have an account?
Rasmi
SOQL join
Hi,
I want to write a query in this way
SELECT Id, Name__c FROM SubCategory__c where CategoryId__r.Id IN (SELECT Id FROM EmissionCategory__c where SourceId__r.Id ='a0N80000000d496EAA')
but IN is not working fine.
I want to avoid the for loop.
Can anyone suggest me how shall i proceed
The doc on the new semi-join feature states that the left hand operand "must be a single primary ID field". My guess is that your problem is using a field that is an ID field in a related object.
You can always do this by assembling a string variable and using that, though.
Hope this helps.