Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference MID
Functions and Expressions Reference Guide
151
Uses
Use
MEMBER when you need to know whether an object occurs within a series.
Related Functions
EXTRACT, LOOKUP
MID
The MID function returns one or more characters from a text item.
Syntax
MID (single-text-expression, single-number-expression,
single-number-expression)
Meaning
MID (source_text, position_to_start_the_search,
number_of_characters)
Returns
This function returns a single-text-item.
MID extracts one or more characters from source_text where
position_to_start_the_search is the position of the first character to extract and
number_of_characters specifies the number of characters to extract. The first
character (leftmost) of source_text has a starting position of 1.
If position_to_start_the_search is greater than the length of source_text,
MID
returns NONE. If position_to_start_the_search or number_of_characters is less
than one,
MID returns NONE. If the rightmost number of characters of
source_text, starting at position_to_start_the_search, is less than
number_of_characters, MID returns the rightmost characters starting at the
position specified in position_to_start_the_search.
Examples
MID ("abc123", 5 , 3) returns 23
MID ("abc123", 7 , 1) returns NONE because argument2 is larger
than the number of characters in argument1.