Internal server error if SQL function REPLACE returns NULL

Details

Detail name Value
Changelog Number 7404
Type Bug
Status Resolved
Affected Versions Exasol 6.1.0, Exasol 6.1.1
Fix Versions Exasol 6.1.2
Resolution Date 2019-01-29

Problem

The SQL function REPLACE returning NULL leads to an internal server error:

create or replace table t(a varchar(2000));
insert into t values 'abcdef';
select replace(a, 'abcdef', NULL) from t;

Workaround

Use the function REGEXP_REPLACE instead:

select regexp_replace(a, 'abcdef', NULL) from t;