Subject How to code an update statement using an inner join within the WHERE clause?
Author melvinhcox
Good Morning!

I am attempting to update a table (widgets). My WHERE clause uses an
inner join to reference corresponding values in a second table
(records).

The update statement is as follows:

update widgets
set valid = "Y"
where (widgets.value_1 - widgets.value_2) * 700 >= records.value_3
* .12
and widgets.inventory_id = records.inventory_id

The statement executes correctly against SYBASE and other databases,
but I receive the following error under Firebird 1.5 (Dialect 1):

Dynamic SQL Error.
SQL error code = -206.
Column unknown.
records.value_3
At line 3, column 48.

What is the correct syntax for this update under Firebird/InterBase?

Your assistance is deeply appreciated.


Melvin Cox