回复 20楼 x271942906
UPDATE TEMP SET 调整后=ICASE(temp.reason="0",TT.NN,temp.reason="1",0,班级平均数) ; FROM (SELECT 班级,班级平均数*SUM(IIF(BETWEEN(reason,"0","1"),1,0)) /SUM(IIF(REASON="0",1,0)) NN FROM TEMP GROUP BY 班级,班级平均数) TT WHERE temp.班级=tt.班级 SELECT TEMP browse
这个代码不能解决你的问题吗
坚守VFP最后的阵地