INSTR
Description:
This function is used to return the position of the first occurrence of one string within another.
Syntax:
InStr([start, ]searched_string, search_string[, compare])
Return Type:
SCALAR
Parameters:
Parameter | Description |
|---|---|
searched_string | The string expression to be searched. |
search_string | The string expression that is to be searched for. |
start | It is a numeric expression that sets the starting position for each search. If this value is omitted, the search begins at the first character position. If the start is null, the function return value is undefined. |
Compare | It is an integer value. This argument is always ignored. It is defined for compatibility with other Instr functions in other languages. |
Example:
With Member [Measures].[I] as
INSTR("hihello", "hello")
select [Measures].[I] ON 0
FROM [AdventureWorksMF]