Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update query not working - Please help.

Status
Not open for further replies.

InfoNow

IS-IT--Management
Apr 20, 2001
106
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top