|
Posted on
2008-08-12 16:11
路缘
阅读( 134)
评论()
编辑
收藏
举报
Code
UPDATE TB_PLAN_BATCH
SET FACT_EXAMINEE_COUNT=(SELECT SUM(1)
FROM TB_EXAMINEE_EXAM T
WHERE T.DEL_FLAG=0 AND T.BATCH_ID=T1.BATCH_ID
)
FROM TB_PLAN_BATCH T1
WHERE T1.PLAN_ID=@planID
-- 用于更新回答正确题目的分数
UPDATE TB_EXAMINEE_PAPER
SET VALID_SCORE=T1.QUESTION_SCORE
FROM TB_EXAMINEE_PAPER T1
LEFT JOIN TB_QUESTION_INFO T2
ON T1.QUESTION_NO=T2.QUESTION_NO
LEFT JOIN TB_EXAMINEE_EXAM T3
ON T1.EXAMINEE_EXAM_ID=T3.EXAMINEE_EXAM_ID
WHERE T3.BATCH_ID=@batchID AND T1.EXAMINEE_ANSWER=T2.STANDARD_ANSWER
|