TD_StrApply Syntax Elements - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
TargetColumns
Specify the names of the input table columns to which to apply the string operator.
OutputColumns
[Ignored with Inplace ('true'), otherwise optional.] Specify names for the output columns. An output_column cannot exceed 128 characters.
Default: With InPlace ('false'), target_column_operator; otherwise target_column
If any target_column_operator exceeds 128 characters, specify an output_column for each target_column.
Accumulate
[Optional] Specify the names of the input table columns to copy to the output table.
With InPlace ('true'), no target_column can be an accumulate_column.
StringOperation
Specify a str_operator from the following table. If str_operator requires string, length, or start_index, specify that value with String, StringLength, or StartIndex.
str_operator Description
CHARTOHEXINT Converts value to its hexadecimal representation.
GETNCHARS Returns length characters from value.

Option: See OperatingSide.

INITCAP Capitalizes first letter of value.
STRINGCON Concatenates string to value.
STRINGINDEX Returns index of first character of string in value.

Options: See IsCaseSpecific.

STRINGLIKE Returns first string that matches specified pattern if one exists in value.

Options: See EscapeString, IsCaseSpecific, IgnoreTrailingBlank.

STRINGPAD Pads value with string to length.

Option: See OperatingSide.

STRINGREVERSE Reverses order of characters in value.
STRINGTRIM If value contains string, trim string from value.

Option: See OperatingSide.

SUBSTRING Returns substring starting at start_index with length from value.
TOLOWER Replaces uppercase letters in value with lowercase equivalents.
TOUPPER Replaces lowercase letters in value with uppercase equivalents.
TRIMSPACES Trims leading and trailing space characters from value.
UNICODESTRING Converts LATIN value to UNICODE.
String
[Required when str_operator needs string argument, ignored otherwise.] Specify string argument for str_operator:
str_operator string
STRINGCON String to concatenate to value.
STRINGINDEX String for which to return index of its first character in value.
STRINGLIKE Pattern that describes string to find in value.
STRINGPAD String with which to pad value.
STRINGTRIM String to trim from value.
StringLength
[Optional] [Required when str_operator needs length argument, ignored otherwise.] Specify length argument for str_operator:
str_operator length
GETNCHARS Number of characters to return from value.
STRINGPAD Length to which to pad value.
SUBSTRING Substring length.
OperatingSide
[Optional] Applies only when str_operator is GETNCHARS, STRINGPAD, or STRINGTRIM. Specifies side of value on which to apply str_operator.
Default: left
IsCaseSpecific
[Optional] Applies only when str_operator is STRINGINDEX or STRINGLIKE. Specify whether search for string is case-specific.
Default: true (search is case-specific)
EscapeString
[Optional] Applies only when str_operator is STRINGLIKE. Specify the escape characters.
IgnoreTrailingBlank
[Optional] Applies only when str_operator is STRINGLIKE. Specify whether to ignore trailing space characters.
StartIndex
[Optional] Applies only when str_operator is SUBSTRING. Specify the index of the character at which the substring starts.
InPlace
[Optional] Specify whether the output columns have the same names as the target columns.
InPlace ('true') effectively replaces each value in each target column with the result of applying str_operator to it.
InPlace ('false') copies the target columns to the output table and adds output columns whose values are the result of applying str_operator to each value.
With InPlace ('true'), no target_column can be an accumulate_column.
Default: true