/* Ficha 67172 - Auto Cidade*/ 

update ComissaoVendedor set PercBaseCalculo = 50
where NumOrd in(select Cp.NumOrd
from complementoNfSaida CP, NFSaidaCad NF 
where Cp.codVendExt is not null and 
Cp.CodVendExt != '' and
Cp.NumOrd = Nf.NumOrd and 
Cp.CodVendExt != Nf.CodVend and 
Nf.NumOrd = ComissaoVendedor.NumOrd and
Cp.CodVendExt = ComissaoVendedor.CodVend)