select bpl.principalId from tbl_BRO_Principals bpl inner join tblManufacturers mfr on bpl.mfrId = mfr.mfr_id inner join tbl_BID_Manufacturers bmfr on bmfr.mfrId = mfr.mfr_id where bpl.ownerId = and bpl.ownerType = and bmfr.bidMfrId = select bpl.principalId from tbl_BRO_Principals bpl inner join tblManufacturers mfr on bpl.mfrId = mfr.mfr_id inner join tbl_BID_Manufacturers bmfr on bmfr.mfrId = mfr.mfr_id where bpl.ownerId = and bpl.ownerType = and bmfr.bidMfrId = select * from tbl_BID_ManufacturersOverride where ownerId = and ownerType = and bidMfrId = and territoryId = select * from tbl_BID_ManufacturersOverride where ownerId = and ownerType = and bidMfrId = and territoryId = select #_col# from tbl_BID_ManufacturersOverride where ownerId = and ownerType = and bidMfrId = and territoryId = and nullif( #_col#, '' ) is not null update tbl_BID_ManufacturersOverride set #_col# = where ownerId = and ownerType = and bidMfrId = and territoryId = insert into tbl_BID_ManufacturersOverride ( #_columnList#, bidMfrId ) select #_columnList#, #attributes.keeperMFR# from tbl_BID_ManufacturersOverride where ownerId = and ownerType = and bidMfrId = and territoryId = delete from tbl_BID_ManufacturersOverride where ownerId = and ownerType = and bidMfrId = and territoryId =