REGEXP_SPLIT_TO_TABLE Function Syntax | Teradata Vantage - 17.10 - REGEXP_SPLIT_TO_TABLE Function Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)
[TD_SYSFNLIB.] REGEXP_SPLIT_TO_TABLE ( inkey, source_string, regexp_string, match_arg )

Syntax Elements

Name of the database where the function is located.
A numeric or character argument that uniquely identifies the source_string in the output result set.
If the inkey is NULL, an empty string is returned.
A character argument.
If source_string is NULL, 0 rows are returned. Zero rows are also returned if the source_string is the empty string.
A character argument.
If regexp_string is NULL, the original source_string is returned.

A character argument.

Valid values are:
  • 'i' = case-insensitive matching.
  • 'c' = case sensitive matching.
  • 'n' = the period character (match any character) can match the newline character.
  • 'm' = source_string is treated as multiple lines instead of as a single line. With this option, the '^' and '$' characters apply to each line in source_string instead of the entire source_string.
  • 'l' = if source_string exceeds the current maximum allowed source_string size (currently 16 MB), a NULL is returned instead of an error. This is useful for long-running queries where you do not want long strings causing an error that would make the query fail. Although the maximum source_string size is 16 MB, the resulting token can only be VARCHAR, and has a maximum return token size of 64000 bytes.
If match_arg is not specified, an error is returned.
If there is no match, the original source_string is returned.
The value of inkey.
The ordinal position of the token in the input string.
A character argument.
The token from the input string in the same character set as instring.
REGEXP_SPLIT_TO_TABLE does not support the output type of CLOB in the token section.