query
RESULTSET
query
  TARGETBROKERID TARGETMFRID
1 2358 603
2 82 642
3 2358 4113
4 2358 6381
5 2358 6421
CACHED false
EXECUTIONTIME 75
SQL select sub.ownerId as targetMfrId, sub.subscriberId as targetBrokerId from tbl_PRD_Subscriptions sub with (nolock) left outer join tblManufacturers mfr with (nolock) on sub.ownerId = mfr.mfr_id left outer join tbl_SMA_BrokerOfficeLink link with (nolock) on sub.ownerId = link.mfr_id and sub.subscriberId = link.brokerId where sub.ownerType = 'MFR' and sub.subscriberType = 'BRO' and sub.subscriberId <> 2661 and link.brokerId is null and mfr.mfr_name is not null order by sub.ownerId, sub.subscriberId

MFR ID: 603 BrokerId: 2358
MFR ID: 642 BrokerId: 82
MFR ID: 4113 BrokerId: 2358
MFR ID: 6381 BrokerId: 2358
MFR ID: 6421 BrokerId: 2358