15.00 - String Function Overview - Teradata Database

Teradata Database SQL Functions, Operators, Expressions, and Predicates

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1145-015K
Language
English (United States)
Last Update
2018-09-24

String Function Overview

SQL provides a concatenation operator and string functions to translate, concatenate, and perform other operations on strings.

The functions documented in this chapter are designed primarily to work with strings of characters. Because many of them can also process byte and numeric literal and literal data strings, the term string is frequently used here to refer to all three of these data type families.

Data Types on Which String Functions can Operate

The following table lists all the data types that can be processed as strings. Note that not all types are acceptable to all functions. See the individual functions for the types they can process.

 

Data Type Grouping

Character

Byte

Numeric

  • CHARACTER
  • VARCHAR
  • CLOB
  • BYTE
  • VARBYTE
  • BLOB
  • BYTEINT
  • DECIMAL
  • FLOAT
  • INTEGER
  • NUMERIC
  • SMALLINT
  • ANSI Equivalence of Teradata SQL String Functions

    Several of the Teradata SQL string functions are extensions to the ANSI SQL:2011 standard.

    To maintain ANSI compatibility, use the ANSI equivalent functions instead of Teradata SQL string functions, when available.

     

    Change this Teradata string function …

    To this ANSI string function in new applications …

    INDEX

    POSITION

    MINDEX

    SUBSTR

    SUBSTRING

    MSUBSTR

    † These functions are no longer documented because their use is deprecated and they will no longer be supported after support for KANJI1 is dropped.

    The following Teradata functions have no ANSI equivalents:

  • CHAR2HEXINT
  • SOUNDEX
  • TRANSLATE_CHK
  • UPPER
  • VARGRAPHIC
  • Additional Functions That Operate on Strings

    SQL provides other string functions and operators that are not discussed in this chapter.

     

    FOR more information on …

    SEE …

    attribute functions that return descriptive information about strings, such as:

  • BYTE
  • CHARACTER_LENGTH/
    CHAR_LENGTH
  • OCTET_LENGTH
  • Chapter 5: “Attribute Functions.”

    comparison operators

    Chapter 10: “Comparison Operators and Functions.”

    the LIKE predicate

    Chapter 20: “Logical Predicates.”