Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference LEFT
Functions and Expressions Reference Guide
145
LEFT
The LEFT function returns a specified number of characters from a text expression
beginning with the leftmost byte of a text item.
Syntax
LEFT (single-text-expression , single-integer-expression)
Meaning
LEFT (text_to_extract_from , number_of_characters_to_extract)
Returns
This function returns a single-text-item.
LEFT returns the leftmost number_of_characters_to_extract characters from
text_to_extract_from starting at the first (the leftmost) character in
text_to_extract_from.
If number_of_characters_to_extract evaluates to an integer whose value is less
than 1,
LEFT evaluates to NONE. If number_of_characters_to_extract
evaluates to an integer whose value is greater than the size of
text_to_extract_from,
LEFT evaluates to the entire value of
text_to_extract_from.
Examples
LEFT ("Abcd", 2) returns Ab
LEFT ("Abcd", 6) returns Abcd
LEFT (LastName + ", " + FirstName, 25)
returns the leftmost 25 characters of the text string resulting from the
concatenation of LastName and FirstName (separated by a comma and a
space).
Uses
Use
LEFT when you need a specific part of a text item. For example, a
customer number may have several uses and sometimes only the first 10