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 |
|
|
|
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:
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: CHAR_LENGTH |
|
comparison operators |
|
the LIKE predicate |