|
目的:是用完全相同的一张表去更并新另一张表关键字相同的记录。
此例:用DailyCSVU更新DailyCSV
为什么失败?请高手指教![:17]
UPDATE dbo.DailyCSV INNER JOIN
dbo.DailyCSVU ON dbo.DailyCSV.SUBCON = dbo.DailyCSVU.SUBCON AND
dbo.DailyCSV.LOCATION = dbo.DailyCSVU.LOCATION AND
dbo.DailyCSV.Lot = dbo.DailyCSVU.Lot
SET dbo.DailyCSV.DATE = dbo.DailyCSVU.DATE,
dbo.DailyCSV.SUBCON = dbo.DailyCSVU.SUBCON,
dbo.DailyCSV.Lot = dbo.DailyCSVU.lOT,
dbo.DailyCSV.COMMAND = dbo.DailyCSVU.COMMAND,
dbo.DailyCSV.EAOPLANNER = = dbo.DailyCSVU.EAOPLANNER,
dbo.DailyCSV.WIPAREA = = dbo.DailyCSVU.WIPAREA,
dbo.DailyCSV.LOCATION = dbo.DailyCSVU.LOCATION,
dbo.DailyCSV.QTY = dbo.DailyCSVU.QTY,
dbo.DailyCSV.SCRAP = dbo.DailyCSVU.SCRAP,
dbo.DailyCSV.Residual = dbo.DailyCSVU.Residual,
dbo.DailyCSV.Remark = dbo.DailyCSVU.Remark |
|