Substring Search - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Teradata Meta Data Services
Release Number
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

Substring Search

Using the REGEX ComparisonOperator, character string properties can be searched for a match of a character string pattern within the property character string.

The following describes the search string value:

  • The search string value can be any character string.
  • The % and _ characters may be used in any combination in the search string
  • The % (percent sign) character represents any string of zero or more arbitrary characters.
  • The _ (spacing underscore) character represents exactly one arbitrary character.
  • Any single character is acceptable in the position in which the underscore character appears, and any string of characters is acceptable as a replacement for the percent.
  • The backslash character (\) can be used as an escape character to search for the %, _ or % characters ( \\, \%, \_ ) in the name or property value.
  • Both leading and trailing pad characters in the property field must match exactly with the search string. For example, ‘A%BC’ matches ‘AxxBC’, but not ‘AxxBΧD’, and ‘A%BΧD’ matches ‘AxxBΧD’, but not ‘AxxBC’ or ‘AxxBΧΔD’ indicates a pad character).
  • Example  

    Using the following settings in a CMetaFilterInfo object:


    The MDS function will return objects with the following names:

          Elvis Presley


    Changing the search string to:


    The MDS function will return all objects with the names beginning with the character ‘P’:



    Changing the search string to:


    Uses the % and _ characters to select a list of names with the letter A as the second letter in the name. The length of the name returned may be two or more characters. The function will return objects with the following names:


    If the example used _a_, the search would be for a three-character string name with the letter a as the second character. In this case, the only object returned is: