INSTR Function
Function Type | Predefined function | |
Syntax | INSTR( <integerStartIndex>, <subString>, <stringValue>, <integerCaseSensitive> ) | |
Description | Returns the position of the first occurrence of one string within another string beginning the search at the specified index. | |
Argument | Description | |
<integerStartIndex> | Position within <stringValue> to begin the search. <integerStartIndex> must be between 1 and approximately 65,500. | |
<subString> | Substring to be searched for within <stringValue>. | |
<stringValue> | String to search. | |
<integerCaseSensitive> | Integer specifying whether the search will be case sensitive. 0 = Case sensitive, 1 = Not case sensitive | |
If subString is found within stringValue, INSTR returns the position at which the match was found. If subString is zero-length, <integerStartIndex> is returned. If <integerStartIndex> is greater than <subString>, <stringValue> is zero-length, or subString cannot be found, INSTR returns zero. If either <stringValue> or <subString> is Null, the function returns Null. | ||
Returns | Integer | |
Example | This example illustrates how to find the position of a dollar sign ($) within the source field, Field1. It begins the search in the first byte of data in Field1 and the search is not case sensitive. INSTR(1,,"$",Source.Table.Field11) |