I have this error when i try to do an update with a inner:
ERROR: syntax error at or near "INNER"
LINE 1: UPDATE sale_order AS so SET state='progress' INNER JOIN sale...
^
the syntax is :
UPDATE sale_order AS so
SET so.state='progress'
INNER JOIN sale_order_invoice_rel AS soi ON so.id= soi.order_id
INNER JOIN account_invoice AS ai ON soi.invoice_id=ai.id
WHERE so.state='done' AND ai.state !='paid';
the schema of the table is :
sale_order : id | state
sale_order_invoice_rel : id | order_id |invoice_id
account_invoice : id | state