老师理解错误了我的意思是将MO的字段进行批量增加作者: djt 时间: 2013-9-25 10:50
先做一个生成表查询
SELECT t1.Co_Number, count(*)+(select Mo_Number from tblMax_Mo) AS ListNo INTO ListNo
FROM [select Co_Number from tbl生产计划明细表 group by Co_Number]. AS t1 INNER JOIN [select Co_Number from tbl生产计划明细表 group by Co_Number]. AS t2 ON t1.Co_Number>=t2.Co_number
GROUP BY t1.Co_Number;
再做一个update更新
UPDATE tbl生产计划明细表 AS t1 INNER JOIN ListNo AS t2 ON t1.Co_Number=t2.Co_Number SET t1.Mo = t2.ListNo; 作者: Henry D. Sy 时间: 2013-9-25 11:25