Limitation: NULL inside Input Strings - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantageā„¢
REGEXP_REPLACE has a limitation in handling ASCII Chr(0), which is NULL. If you concatenate two strings using ASCII Chr(0), REGEXP_REPLACE cannot handle that input string. For example, consider the following code:
sel TD_SYSFNLIB.RegExp_Replace ('a'||chr(0)||'bc', '[b]', 'X', 1, 0) AS 
regex_rep_input_string;
The function is supposed to replace the b in the input string 'a'||chr(0)||'bc' with X. The result should be a Xc. However, because of the limitation, the result is a.