Like - Teradata Warehouse Miner

Teradata Warehouse Miner User Guide - Volume 2ADS Generation

Product
Teradata Warehouse Miner
Release Number
5.4.5
Published
February 2018
Language
English (United States)
Last Update
2018-05-03
dita:mapPath
qhj1503087326201.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2301
Product Category
Software

The standard Like predicate is supported, either with pattern expressions or with subqueries. The percent (%) or underscore (_) characters can be used to allow searching for a pattern. The percent character represents zero or more characters of any value, whereas underscore represents exactly one. An “escape” character may optionally be specified to allow searching for patterns that include a percent (%) or underscore (_) character by placing an escape character immediately before either of these characters.

Some examples of the form that the Like predicate can take include the following.

expression LIKE ‘patternexpression LIKE ANY/ALL (pattern list)
expression LIKE ANY/ALL (subquery)
(expression list) LIKE ANY/ALL (subquery)

When dragging a Like operator into a variable, the following tree element is created.

Variable Creation > Input > Variables: SQL Elements pane - Logical > Like

Columns and/or other expressions can be moved into the (empty) branches of the tree, where the first argument is the expression to the left of the LIKE and the second to the right. The subquery element is found in the Other - Expert category of SQL Elements.

The following are some examples of different Like predicates in WHERE clauses.

expression LIKE ‘pattern’
Variable Creation > Input > Variables: SQL Elements pane - Logical > Like Example 1

expression LIKE ANY/ALL (pattern list)
Variable Creation > Input > Variables: SQL Elements pane - Logical > Like Example 2

expression LIKE ANY/ALL (subquery)
Variable Creation > Input > Variables: SQL Elements pane - Logical > Like Example 3

(expression list) LIKE ANY/ALL (subquery)
Variable Creation > Input > Variables: SQL Elements pane - Logical > Like Example 4

The Like operator contains one property, an optional Escape Character, that may be set by clicking Properties.