解决方案: |
在查询分析器中选择2005年年度帐库执行以下脚本(执行前请作好数据备份) 1、update ia_valuationass Set iIprice = iIquantity * Isnull(iinCost,ioutcost) from ia_valuationass left join ia_subsidiary on ia_valuationass.inid = ia_subsidiary.id and ia_valuationass.cinvcode = ia_subsidiary.cinvcode Where iIprice is null and (iIquantity is not null or ioutcost is not null) 2、update ia_valuationass Set iOPrice = iOquantity * Isnull(iinCost,ioutcost) from ia_valuationass left join ia_subsidiary on ia_valuationass.Outid = ia_subsidiary.id and ia_valuationass.cinvcode = ia_subsidiary.cinvcode Where iOPrice is null and (ioquantity is not null or ioutcost is not null) |