update prod set saiu = 'T' where (SELECT COALESCE(SUM(Quant), 0) FROM Pro WHERE Pro.Cod=Prod.Cod)<=0