Q:

Derby SQL Update Trigger

I am attempting to write an update trigger for a Derby database. The trigger needs to update the ODS_CNTRL_AUDIT table every time a change is made/ a new record is added to the ODS_CNTRL table. (This is in Oracle)
So far I have 
            create trigger Update_Audit
            after update 
               on ODS_CNTRL
            for each row MODE DB2SQL
            insert into ODS_CNTRL_AUDIT
            (
            ODS_LOAD_ID, ODS_STATUS, USR_WWID, USR_FIRST_NM, 
            USR_LAST_NM, USR_DISPLAY_NM, USR_NT_ID,TOT_AMT
            )
            values
            (
            ODS_CNTRL.ODS_LOAD_ID, ODS_CNTRL.ODS_STATUS, ODS_CNTRL.USR_WWID, ODS_CNTRL.USR_FIRST_NM, 
            ODS_CNTRL.USR_LAST_NM, ODS_CNTRL.USR_DISPLAY_NM, ODS_CNTRL.USR_NT_ID, ODS_CNTRL.TOT_AMT, 
            T
            );

But this code will not run. I am receiving the error -
  "Error code -1, SQL state 42X04: Column 'ODS_CNTRL.ODS_LOAD_ID' is either not in any     table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'ODS_CNTRL.ODS_LOAD_ID' is not a column in the target table."

Do I need to add a For command? What edits need to be made for this trigger to work properly? All the values are columns in the ODS_CONTROL table.

A:

I have figured out the issue. I needed to have a select/from statement for each in the value section. My end code looked like this- 
  create trigger UpdateAUDIT
  after update  
            on ODS_CNTRL
  for each row MODE DB2SQL
            insert into ODS_CNTRL_AUDIT
            (
            ODS_LOAD_ID, ODS_STATUS, USR_WWID, USR_FIRST_NM, 
            USR_LAST_NM, USR_DISPLAY_NM, USR_NT_ID,TOT_AMT
            )
            values
            (
            (select ODS_LOAD_ID from ODS_CNTRL),(select ODS_STATUS from ODS_CNTRL),
            (select USR_WWID from ODS_CNTRL), (select USR_FIRST_NM from ODS_CNTRL),
            (select USR_LAST_NM from ODS_CNTRL),(select USR_DISPLAY_NM from ODS_CNTRL),
            (select USR_NT_ID from ODS_CNTRL),(select TOT_AMT from ODS_CNTRL)
            );

