http://ora-01758.ora-code.com/
ORA-01758: | table must be empty to add mandatory (NOT NULL) column |
Cause: | It is not possible to define a new column as NOT NULL if rows already exist in the table being modified. |
Action: | Retry the statement without the NOT NULL specification. |
alter table GCD.DAILY_ACCRUAL_VIRTUS_STAG add
(
ASOFDATE DATE NOT NULL
)
/
update GCD.DAILY_ACCRUAL_VIRTUS_STAG set asofdate=trunc(sysdate, 'dd')
/
alter table GCD.DAILY_ACCRUAL_VIRTUS_STAG modify
(
ASOFDATE NOT NULL
)
/