例 - Teradata Database - Teradata Vantage NewSQL Engine - 文字列演算子、STRTOK_SPLIT_TO_TABLE関数の例。

Teradata Vantage™ SQL関数、演算子、式および述部

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
2019年3月
Language
日本語
Last Update
2019-10-29
dita:mapPath
ja-JP/xzf1512079057909.ditamap
dita:ditavalPath
ja-JP/xzf1512079057909.ditaval
dita:id
B035-1145
Product Category
Software
Teradata Vantage

状況

CREATE TABLE t (id integer, str varchar(256)character set unicode);

および

INSERT INTO t VALUES (1,'Teradata-Warehouse 13.10 - Combine 2 powerful forms of business intelligence (BI).'); 

および

insert into t values (2,'http://www.teradata.com/');

結果

SELECT d.* FROM TABLE (strtok_split_to_table(t.id, t.str, ' -/')
RETURNS (outkey integer, tokennum integer, token varchar(20)character set unicode) ) as d order by 1,2;
outkey   tokennum  token
-----------  -----------  --------------------------
          1            1  Teradata
          1            2  Warehouse
          1            3  13.10
          1            4  Combine
          1            5  2
          1            6  powerful
          1            7  forms
          1            8  of
          1            9  business
          1           10  intelligence
          1           11  (BI).
          2            1  http:
          2            2  www.teradata.com