select cdr_territoryId from tbl_CDR_Distributors where cdr_recordId = and ownerId = and fsl_tablecode =