Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference SEARCHDOWN
Functions and Expressions Reference Guide
177
Examples
SEARCHDOWN ( Age Column:Row:DBSelect ,
SSN Column:Row:DBSelect ,
SSN_Value:Message )
If there are ten Rows in DBSelect, the search starts by comparing the first
SSN Column of the fifth Row with the SSN_Value in Message. If the result
matches,
SEARCHDOWN returns the first Age Column of that Row. If the value
of SSN Column is less than the SSN_Value in Message, the search continues
with the third Row. If the value of SSN Column is greater than the
SSN_Value in Message, the search continues with the seventh Row in
DBSelect. The search continues in this fashion until either a match is found or
until one Row is selected. If there is more than one SSN Column for the
selected Row, a similar search is initiated for all SSN Column’s for the
selected Row in DBSelect.
SEARCHDOWN returns the first Age Column for the selected Row of DBSelect.
Uses
Use SEARCHDOWN when data is sorted in ASCII descending order and you need
to look up data within the sorted data.
Related Functions
EXTRACT, LOOKUP, SEARCHUP