把一张表里面的字段 更新到另外一张表里面

update T_IM_MoveIssueBillEntry t1

set t1.CFPriceincrease=(select t2.CFPriceincrease from T_IM_StockTransferBillEntry t2 where t2.fid = t1.FSourceBillEntryID )


以上sql 报错 


update T_IM_MoveIssueBillEntry t1
set    CFPriceincrease=(select t2.CFPriceincrease from T_IM_StockTransferBillEntry t2 where t2.fid = t1.FSourceBillEntryID )


区别就是 t1.CFPriceincrease  与 CFPriceincrease

你可能感兴趣的:(sqlserver)