select distinct fsl_dstId, ownerId, fsl_tablecode from tbl_CDR_Distributors with (nolock) where nullif( fsl_dstId, 0 ) is not null and fsl_mapPriority = 0 order by fsl_tablecode, ownerId