d7+access 2003 求查询语句
access 2003中目前有两个表:
汇率表:t_exchangeRate
结构:
----ID Fyear Fperiod FNumber FName FExchange-- 1 2011 8 NTD 新台币 0.227-- 2 2011 8 RMB 人民币 1-- 3 2011 8 USD 美元 6.5-- 4 2011 9 NTD 新台币 0.21-- 5 2011 9 RMB 人民币 1-- 6 2011 9 USD 美元 6.47
----ID Fyear Fperiod FTotalCostRMB FTotalCostNTD FTotalCostUSD-- 1 2011 8 0.15 ? ?-- 1 2011 9 0.15 ? ?
update t_productCost setFTotalCostNTD=FTotalCostRMB*(Select Top 1 FExchange From t_exchangeRate A Where t_productCost.Fyear=A.Fyear And t_productCost.Fperiod=A.Fperiod And A.FNumber='NTD'),FTotalCostUSD=FTotalCostRMB*(Select Top 1 FExchange From t_exchangeRate B Where t_productCost.Fyear=B.Fyear And t_productCost.Fperiod=B.Fperiod And B.FNumber='USD')