17.00 - 17.05 - 問合わせの例 - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL外部ルーチン プログラミング

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Published
2020年6月
Content Type
プログラミング リファレンス
Publication ID
B035-1147-170K-JPN
Language
日本語 (日本)
SELECT * FROM Sessionize (ON td2 USING TimeCol('eventinfo') timeout(30))
AS J1;

CREATE SET TABLE UT1.td2 ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO
     (
     guid INTEGER,
     payload VARCHAR(2048) CHARACTER SET LATIN NOT CASESPECIFIC,
     eventinfo TIMESTAMP(6))
;

SELECT guid, sessionid FROM Sessionize (ON td2 USING 
TimeCol('eventinfo') timeout(30)) AS J1;

*** Query completed. 5 rows found.

       GUID    SessionID
-----------  -----------
         33            1
         33            2
         33            2
         33            2
         33            3

SELECT * FROM td2;

*** Query completed. 5 rows found.

       guid  payload                         eventinfo
-----------  ------------------------------  ---------
         33  http://dougfy.wikidot.com/debu  2013-06-09 20:21:44.000000
         33  http://dougfy.wikidot.com/debu  2013-06-10 19:08:55.000000
         33  http://dougfy.wikidot.com/debu  2013-06-10 19:09:01.000000
         33  http://dougfy.wikidot.com/debu  2013-06-10 19:09:04.000000
         33  http://dougfy.wikidot.com/debu  2013-06-10 19:09:41.000000