Hi, I am trying to translate the following SQL query into a query expression or a fetch XML. I know I can get the Raw data from the Opportunity Entity and use LINQ queries to filter out what I need but I would like to know if there is a way to get it done using a query expression or a fetch XML.
SELECT o.OpportunityId FROM dbo.Opportunity o WHERE NOT EXISTS ( SELECT cbo.New_OpportunityId FROM dbo.New_commission cbo INNER JOIN dbo.New_commissionreport cr ON cr.New_commissionreportId = cbo.New_CommissionReportId WHERE cbo.New_OpportunityId = o.opportunityid AND cbo.New_Type = 1 -- type new AND (cr.New_CommissionPeriodFrom BETWEEN '20181001' AND '20181031' ) );
Please advise.
*This post is locked for comments