Not Exists - Teradata Warehouse Miner

Teradata® Warehouse Miner™ User Guide - Volume 2ADS Generation

Product
Teradata Warehouse Miner
Release Number
5.4.6
Published
November 2018
Language
English (United States)
Last Update
2018-12-07
dita:mapPath
gxn1538171534877.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2301
Product Category
Software

The standard Not Exists predicate is supported to test whether a subquery in a WHERE clause does not produce any rows. The generated SQL takes the form NOT EXISTS subquery. When dragging a Not Exists operator into a WHERE clause, something like the following tree element is created.

Variable Creation > Input > Variables: SQL Elements pane - Logical > Not Exists

To complete the Not Exists predicate it is necessary to drag a Subquery element from the Other - Expert category onto the empty - Subquery node. Then a Variable Creation analysis must be created to supply the subquery, checking the Expert clause subquery box on the analysis parameters tab of the analysis.

To place the subquery SQL directly into this analysis, further select the Output option to Generate the SQL for this analysis but do not execute it in the subquery analysis.

Finally, a column (any column) produced by this analysis must be selected after setting Input Source to Analysis and selecting the subquery analysis under Analyses, dragging it onto the empty node under the Subquery element. This produces something like the following tree element:

Variable Creation > Input > Variables: SQL Elements pane - Logical > Not Exists Subquery

There are no special properties for the Not Exists operator.