INDENTIFY GLOBAL TEMPORARY TABLES

Database

INDENTIFY GLOBAL TEMPORARY TABLES

Hi all,

Do anyone know how to identify global temporary tables?
I need to identify a global temporary table that is not materialized and I don't have access to DBC.TVM.
I know that the request_text field in DBC.TABLES view keeps the last table ddl, but if an alter command has been submitted the entire table DDL is missed.
I was wondering some query like "select field from dbc.tables" view for example.

Thanks in advance,

Rodrigo Cruz
2 REPLIES
Teradata Employee

Re: INDENTIFY GLOBAL TEMPORARY TABLES

You can use select * from AllTempTables but this is only materialized tables. You can use select * from dbc.temptables if you have access.
N/A

Re: INDENTIFY GLOBAL TEMPORARY TABLES

Hi Rodrigo,
in TD12 the dbc.tvm.CommitOpt is carried over to the dbc.tables view.
Before that the only way to identify GTTs is a HELP DATABASE, which also returns the CommitOpt:
'D' or 'P' -> GTT

Dieter