I have a table named documents where it has a column document_nbr that has a not null constraint.
I want to remove any trailing spaces that are within the document_nbr's.
I have tried different combinations of an update statement but none seem to work, as it violates the not null constraint.
set document_nbr = trim(document_nbr)
Is there a way to update these columns while still having the not null constraint still being enabled?
I don't want to alter the table or create a temp table and add the records and reinsert them in or any type
of DDL command.
Is there a way to do this just by using an update statement?
Oracle 11g is used.