Hello fellow members,
Can anyone reproduce this?
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Create a small table:
SQL> create table t(x number not null);
Table created.
Now add a virtual column, using decode:
SQL> alter table t add (y varchar2(1) as (decode(x, 1, 'A', 'B')) not null);
Table altered.
"Same" column, using case
SQL> alter table t add (z varchar2(1) as (case x when 1 then 'A' else 'B' end));
Table altered.
Only it was not the same, I wanted to make it NOT NULL.
If I do so, I get:
SQL> alter table t add (w varchar2(1) as (case x when 2 then 'A' else 'B' end) not null);
alter table t add (w varchar2(1) as (case x when 2 then 'A' else 'B' end) not null)
*
ERROR at line 1:
ORA-03113: EOF pÕ kommunikationskanal
Process ID: 3400
Session ID: 140 Serial number: 213
This is consistent at this database on my laptop.
Regards
Peter