I have a table called UsystblbatchRecord. When the field RevNum gets updated, I would like a query to update the same field to another table called UsystblTrainRec and set the traindate, EvaluationMethods to Null. The idea is, whenever there is a new Revision number, I want to reset the training date and eval method to null so that employees get retrain. If there is no changes then leave the data alone. The query below seems to run without any error, but it does not update the UsystblTrainRec table. Please check to see what I did wrong.
UPDATE UsystblTrainRec INNER JOIN UsystblBatchRecord ON UsystblTrainRec.DocNum = UsystblBatchRecord.DocNum SET UsystblTrainRec.RevNum = UsystblBatchRecord.RevNum, UsystblTrainRec.TrainDate = Null, UsystblTrainRec.EvaluationMethods = Null
WHERE (((Exists (SELECT UsystblTrainRec.DocNum, UsystblTrainRec.RevNum From UsystblTrainRec
WHERE UsystblTrainRec.DocNum=UsystblBatchRecord.DocNum AND UsystblTrainRec.RevNum=UsystblBatchRecord.RevNum))=False));
TIA for helping.
UPDATE UsystblTrainRec INNER JOIN UsystblBatchRecord ON UsystblTrainRec.DocNum = UsystblBatchRecord.DocNum SET UsystblTrainRec.RevNum = UsystblBatchRecord.RevNum, UsystblTrainRec.TrainDate = Null, UsystblTrainRec.EvaluationMethods = Null
WHERE (((Exists (SELECT UsystblTrainRec.DocNum, UsystblTrainRec.RevNum From UsystblTrainRec
WHERE UsystblTrainRec.DocNum=UsystblBatchRecord.DocNum AND UsystblTrainRec.RevNum=UsystblBatchRecord.RevNum))=False));
TIA for helping.