InStr

The MDX InStr function for Essbase returns a number specifying the position of the first occurrence of one string within another. This function requires a start parameter.

Syntax

InStr ( start, string1, string2 [,compare] )

Parameters

start

Character position to begin search in string1. For example, a position value of 1 indicates that the search begins at the first character in the string. This parameter is required.

string1

String expression or literal string in which to search.

string2

String expression or literal string for which to search.

compare

Optional search mode. Values: 0 for case sensitive, 1 for case insensitive. Default is case sensitive.

Notes

If a matching string is not found, the return value is 0.

If you require an optional start argument, then use the InString function instead.

Example

InStr (5, "Year2000_promotional", "promotional", 1) 

returns 10