Function: nthValue
Author: Robert D. Meunier - Database Fusion
Version: 1.0
Purpose: To extract the Nth value from a delimited list of values.
Syntax: nthValue( InputString, Delimiter[*], NthPosition)
Where: InputString: A SQL VarChar datatype containing the list of
delimited values.
Delimiter: The character that is used to delimit the list.
The delimiter must be a single character followed
by an optional asterisk. The asterisk says to
treat multiple back to back delimiters as a single
delimiter.
NthPosition: The value from within the delimited list that
is to be returned.
Returns: A SQL VarChar datatype containing the requested postitional
value from the list of values. If a NULL InputString is
supplied NULL will be returned. If NthPosition is out of range
a zero length string will be returned.
|