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

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1145-171K
Language
English (United States)

An example of a SELECT statement:

SELECT * from table(regexp_split_to_table
('phonemaker','Apple&Microsoft&Google','&','c')
returns (outkey varchar(30), token_ndx integer, token varchar(100))) as t1;


returns a table with the following rows:

outkey                            token_ndx      	token
------------------------------ ----------------  -----------------------
p h o n e   m a k e r             1     	        A p p l e
p h o n e   m a k e r             2     	        M i c r o s o f t
p h o n e   m a k e r             3     	        G o o g l e