with operators as ( select opr.operatorId, opr.companyName, opr.crmActive, cho.cho_id, cho.cho_name from tbl_OPR_ClientOperators opr with (nolock) left outer join tbl_CHO_Operators cho with (nolock) on cho.cho_Id = opr.fsl_choId where opr.ownerId = and opr.fsltablecode = ) #forJSON( 'operators', attributes.datastore, 'companyName' )#