15.00 - When the Actual User or Database Does Not Match the Definition Reported by SHOW MACRO or SHOW VIEW - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

prodname
Teradata Database
vrm_release
15.00
category
Programming Reference
featnum
B035-1184-015K

When the Actual User or Database Does Not Match the Definition Reported by SHOW MACRO or SHOW VIEW

When you copy or restore an archived macro or view definition to a different database or user than the one from which it had been archived, later SHOW MACRO or SHOW VIEW requests display the containing database or user for the original CREATE text for the macro or view stored in DBC.TVM.RequestText, not updated CREATE text that indicates the database or user into which the archived view or macro definition has been copied or restored.

This behavior is different from that for other SHOW statements, which generate the SQL text for the current definition of the specified object by building a parsing tree for the text from data in the table header and then working backward to return the SQL text for the current definition of the object. This reconstruction of definition text is not possible for macros and views because they do not have table headers from which current SQL definition text can be generated.