17.10 - Example: Creating Object List ‘ObjNotInMap2’ - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-08-13
dita:mapPath
fsi1592016213432.ditamap
dita:ditavalPath
fsi1592016213432.ditaval

In this example, create an object list named ‘ObjNotInMap2’ consisting of all objects not in TD_Map2.

CALL TDMaps.CreateObjectListSP('ObjNotInMap2',NULL,:ObjectListId);

INSERT TDMaps.ObjectListEntry 
SELECT ZoneName, ListId, DatabaseName, TableName 
FROM TDMaps.ObjectListTbl,  dbc.tablesv t
WHERE ListName = 'ObjNotInMap2'
and TableKind IN ('T','I','J','N','O') 
and t.mapname not in ('td_datadictionarymap', 'td_globalmap','td_map2');