select opr.operatorId from tbl_OPR_ClientOperators opr inner join tbl_LST_PartnerListItems pli on pli.partnerId = opr.operatorId where opr.ownerId = 2512 and opr.fsltablecode = 'BRO' and ( opr.oprcompanytype = 'G' or opr.oprcompanytype = 'C' ) and pli.listId = 182900 select opr.crmActive, opr.territoryId from tbl_OPR_ClientOperators opr where opr.ownerId = 14 and opr.fsltablecode = 'BRO' and opr.operatorId = update tbl_OPR_ClientOperators set crmActive = , territoryId = where ownerId = 2512 and fsltablecode = 'BRO' and operatorId =