Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference FIND
Functions and Expressions Reference Guide
109
FIND
The FIND function looks for one text string within another text string and returns
to its starting position, if found.
Syntax
FIND (single-text-expression , single-text-expression
[ , single-number-expression ] )
Meaning
FIND (text_to_find, where_to_look[ ,
position_to_start_the_search ] )
Returns
This function returns a single-integer.
FIND returns the starting position of the text item specified by text_to_find
within the text item specified by where_to_look. A third argument
(position_to_start_the_search) can be used to specify the location in
where_to_look for the
FIND to begin. Bytes in the text are numbered from left
to right, with the leftmost byte being position 1.
If text_to_find is NONE,
FIND evaluates to NONE.
If a third argument is not used or position_to_start_the_search evaluates to a
negative number, it is assumed to be 1. If position_to_start_the_search
evaluates to a number greater than the size of where_to_look,
FIND evaluates
to NONE.
If text_to_find is not found in the where_to_look string,
FIND evaluates to 0.
Examples
FIND ("id", "Florida") returns the value 5.
FIND ("id", "Florida", 8) returns 0 because the 8
(position_to_start_the_search) is greater
than the size of where_to_look.
FIND ("\", "mypath",2) returns 0 because the string "\" was not
found in argument 2.