I got the same problem when updating Openemr. My database is using mysql.
Error message as below.
Query Error
ERROR: query failed: UPDATE icd10_dx_order_code
SET revision
= (SELECT MAX(revision
) from icd10_dx_order_code) WHERE dx_code
= ‘U071’
Error: Table ‘icd10_dx_order_code’ is specified twice, both as a target for ‘UPDATE’ and as a separate source for data
I tried Mark solution but it seems like it did not work by making changes to patch.sql
Please follow up.
Thanks