Receiving an "Ora-01400: cannot insert NULL into (Schema.Table.Column)" error importing
説明
When trying to enter a NULL into a not null column with a default, using Import Table Data, an error message is returned that says, "Ora-01400: cannot insert NULL into (Schema.Table.Column)".
原因
Prior to v11.5, this worked correctly. However, The import table data code was rewritten in 11.5. The rewrite made imports happen much faster, and remove some restrictions with file and table sizes. It seems that in previous versions when there was a NULL in the dataset, the import wizard did nothing with that column. The current version always imports what is in the file (null or non-null). If the import is changed so that it worked as before, Toad would lose a lot of the speed benefits that were realized starting in the 11.5 version.
対策
WORKAROUND: Make an AFTER INSERT trigger to look for nulls and substitute with default values.
STATUS: This issue is fixed in Toad for Oracle 12.8. This version can be downloaded here.