|
两张表,当DailyCSV中的主键与用DailyCSVU相同时,更新DailyCSV中的记录。
错误在哪?高手请指教!
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
[ 本帖最后由 catty_zhou 于 2008-8-19 18:12 编辑 ] |
|