IkeAbalogu <[email protected]> writes:

> Thanks.I see the error.I am updating newrow because it is the newly inserted
> row that the trigger will update its previousbalance column.I will try to
> come with a where statement to get to the newly inserted row.Your help will
> still be appreciated.

Perhaps you could add a primary key column to the PRODUCTQUANTMONITOR
table and use that column in a WHERE clause in the UPDATE statement? The
primary key could be automatically generated by Derby using an identity
column:

  CREATE TABLE PRODUCTQUANTMONITOR (
    ID INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
    ...)

-- 
Knut Anders

Reply via email to