I need some guidance on subqueries. Can you use merge syntax in a subquery? I have an invoice line object connected to a Rebate Line object via the item object. I want a subquery condition that looks at the invoice date and see if it is in between the start and end date found on the rebate line.
I get the below error:
1. An error occurred while attempting to perform the following SOQL query: SELECT SCMC__Invoicing__r.SCMC__Invoice_Date__c,SCMC__Item__c,SCMC__Item__r.Name,SCMC__Applied_Rebate_Amount__c,Id,CurrencyIsoCode FROM SCMC__Invoice_Line_Item__c WHERE (SCMC__Item__c in (SELECT SCMC__Item__c FROM SCMC__Rebate_Line__c WHERE (((SCMC__Rebate__r.SCMC__Start_Date__c >= SCMC__Invoicing__r.SCMC__Invoice_Date__c)AND(SCMC__Rebate__r.SCMC__End_Date__c <= SCMC__Invoicing__r.SCMC__Invoice_Date__c)))))AND(SCMC__Applied_Rebate_Amount__c != null) LIMIT 21 Error:expecting a colon, found ‘SCMC__Invoicing__r.SCMC__Invoice_Date__c’