CREATE TABLE TEST (
FIELD1 CHAR(10) NOT NULL
);
commit;
insert into test(field1) values ('N');
insert into test(field1) values ('N');
insert into test(field1) values ('I');
commit;
CREATE UNIQUE INDEX TEST_I1 ON TEST COMPUTED BY (iif(field1 = 'I', 'I', null))
commit;
On 3.0 and 4.0 it works, but on 5.0 fails:
attempt to store duplicate value (visible to active transactions) in unique index "TEST_I1".
Problematic key value is ( = NULL).
CREATE TABLE TEST (
FIELD1 CHAR(10) NOT NULL
);
commit;
insert into test(field1) values ('N');
insert into test(field1) values ('N');
insert into test(field1) values ('I');
commit;
CREATE UNIQUE INDEX TEST_I1 ON TEST COMPUTED BY (iif(field1 = 'I', 'I', null))
commit;
On 3.0 and 4.0 it works, but on 5.0 fails:
attempt to store duplicate value (visible to active transactions) in unique index "TEST_I1".
Problematic key value is ( = NULL).