Example: Using QryLogSQL - Advanced SQL Engine - Teradata Database

Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
muh1623078990997.ditamap
dita:ditavalPath
muh1623078990997.ditaval
dita:id
B035-1092
lifecycle
previous
Product Category
Teradata Vantage™

The following SELECT statement retrieves the SQL text information of a query.

                 SELECT QueryID, SqlRowNo, SqlTextInfo from DBC.QryLogSQL
                   WHERE QueryId=201205134619838024;

Result:

QueryID            SqlRowNo SqlTextInfo
------------------ -------- ----------------------------
201205134619838024 1        CREATE TABLE table1A,
                             FALLBACK, NO BEFORE JOURNAL, 
                             NO AFTER JOURNAL (i INTEGER, 
                             i2 INTEGER)  
                             PRIMARY INDEX( i );
The SQL text is not edited to remove any blanks; it is stored the same way you entered the text.