I have been banging my head against the wall and cannot not get this query right.
Here is the situation:
I have two tables:
exams_access
examdoctors
In the exam_access table there is fields with the following:
Drg
DrS
If the doctor performed the exam it would be marked with a 1.
Now I want to take the above doctors and import them into the examdoctors table and mark Drg as 1 if the exam was performed by them and DrS if the exam was performed by DrS with a 2.
The common fields of BOTH tables are ExamID, which it would have to match between the two
This is the query I thought would work, but craps out when ran against mySQL
UPDATE examdoctors SET DoctorID = 1 WHERE exams_access.ExamID = ExamID AND exams_access.Drg =1;
I get an error stating that exams_access table does not exist, but I am staring right at it