benjamenus
Programmer
FORCING DEFAULT VALUES WHEN THE APPLICATION INSERTS NULL...
I have an application which uses an Oracle DB. I do not have access to the source code for this application.
It is possible for a user to add a record leaving a field blank. When the application inserts this record it specifies NULL as the value for blank fields.
I wish to force a default value where users leave blank fields but cannot do this by amending the table as specifying NULL overrides this.
I've tried writing an after-insert trigger that checks the record and updates it if there are null fields, however this produces error 4091 as I'm trying to update the table I'm reading from.
Any ideas how to force the default values without having access to the application source code will be greatly appreciated.
I've tried reconfiguring the users but they keep crashing!
I have an application which uses an Oracle DB. I do not have access to the source code for this application.
It is possible for a user to add a record leaving a field blank. When the application inserts this record it specifies NULL as the value for blank fields.
I wish to force a default value where users leave blank fields but cannot do this by amending the table as specifying NULL overrides this.
I've tried writing an after-insert trigger that checks the record and updates it if there are null fields, however this produces error 4091 as I'm trying to update the table I'm reading from.
Any ideas how to force the default values without having access to the application source code will be greatly appreciated.
I've tried reconfiguring the users but they keep crashing!