When trying to execute the update query in SQL+ you will see the following error.
update shape
set has_shape_ind = 'N'
where shape_id = 16285
ERROR at line 1:
ORA-20002: SQL ERROR -1400 ORA-01400: cannot insert NULL into ("BIOTICS_USER"."AUDIT_LOG"."USER_NAME")!
ORA-06512: at "BIOTICS_USER.TR_SHAPE_AU", line 140
ORA-04088: error during execution of trigger 'BIOTICS_USER.TR_SHAPE_AU'
This is becuase there are database triggers that require a rec_last_mod_user to be specified, and it doesn't fill in automatically when you do an update in SQL+. You need to add a line to your statement:
update shape
set has_shape_ind = 'N',
rec_last_mod_user = '{your username}'
where shape_id = 16285;
You will see this error when trying to update other tables that use triggers to move data to the audit log.
Update syntax to avoid trigger error: ORA-01400: cannot insert NULL into ("BIOTICS_USER"."AUDIT_LOG"."USER_NAME") Print
Modified on: Tue, 4 Nov, 2014 at 8:39 AM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.