select cdr.ownerId, cdr.fsl_tablecode, cdr.cdr_recordId, cdr.cdr_dstcode, cdr.cdr_dstName, cdr.fsl_dstid, ter.territoryId, ter.internalSalesId, ter.name territoryName from tbl_CDR_Distributors cdr inner join tbl_TER_Territories ter on ter.territoryId = cdr.cdr_territoryId and ter.ownerId = cdr.ownerId and ter.fsl_tablecode = cdr.fsl_tablecode inner join tbl_SMA_BrokerOfficeLink sma on sma.territoryId = ter.territoryId and sma.primaryOffice = 'Y' and sma.mfr_id = ter.ownerId where sma.brokerId = and sma.mfr_Id = and cdr.cdr_dstCode = and exists ( select * from tbl_MFR_TPF_Detail#_tpfSuffix# tpf where tpf.tpartnerType = 'CDR' and tpf.tpartnerId = cdr.cdr_recordId and tpf.mfr_id = cdr.ownerId and tpf.forecast_status = 'A' )
Nothing to Display
This MFR does not provide sales data at this time or the customer number for this distributor is incorrect.