You're updating Covr table, so it should be first here in FROM clause and then you join with Patient, because you're updating Covr with patient's data.
UPDATE TableToUpdate FROM TableToUpdate INNER JOIN TableUsedForUpdate ON ...
The only thing I haven't exactly figured in this syntax as how to apply aliases for the tables here.
>Ok. Why is the FROM referencing the covr table? Logically it seems like it would be the patient table as that is where the update is coming from. Just trying to understand the logic of it.
>
If it's not broken, fix it until it is.
My Blog