InString
The MDX InString function for Essbase returns a number specifying the position of the first occurrence of one string within another. If a matching string is not found, the return value is 0.
Syntax
InString (string1, string2, [start] [,compare])
Parameters
- string1
-
String expression or literal string in which to search.
- string2
-
String expression or literal string for which to search.
- start
-
Optional character position to begin search in string1. The default value is 1. A position value of 1 indicates the very first character in the string. If omitted, search begins at first character in string1.
- compare
-
Optional search mode. Values: 0 for case sensitive, 1 for case insensitive. Default is case sensitive.
Example
InString ("Year2000_promotional", "promotional", 5,1)
returns 10
If the start parameter is omitted, the comma before the compare parameter is still required:
InString ("Year2000_promotional", "promotional", ,1)
If the compare parameter is omitted, the comma before the start parameter is still required:
InString ("Year2000_promotional", "promotional", 5)