exec('update SupplyplanLack set Completedate = GetDate() from supplyPlanLack a where '+ @ssTmp +' and '+@iCompleteQty+' >= (select s.RequestQty * a.RationQty as ReQQty from Balance a, SupplyPlan s where a.Vehicle = s.Vehicle and a.Part=s.Part and a.SupplyPlanNo = s.SupplyPlanNo and '+ @ssTmp +')')