select operatorId, companyName, mfrcustnum
from tbl_OPR_ClientOperators opr
inner join tbl_TER_Territories ter
on ter.territoryId = opr.territoryId
where ter.levelId = 62
and opr.mfrcustnum = '0'
order by operatorId
select operatorId, companyName, mfrcustnum
from tbl_OPR_ClientOperators opr
inner join tbl_TER_Territories ter
on ter.territoryId = opr.territoryId
where ter.levelId = 62
and opr.mfrcustnum <> '0' and opr.mfrcustnum <> ''
and opr.operatorId =
#companyName#
#mfrcustnum#
NULL#qmd_lookup.mfrcustnum#
update tbl_OPR_ClientOperators
set mfrcustnum =
where operatorId =
and mfrcustnum =