Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI SQL Data Access Server (RTQP Engine)

INSTR

  • Last UpdatedDec 19, 2022
  • 1 minute read

The INSTR function searches for a character expression (findWhat) within a second character expression (searchWhat) and returns the starting position of the first expression if found. If needed, you can specify the starting position (n) of the search and the occurrence number (m) of the expression to be found.

Syntax

Int32 INSTR(searchWhat AnsiString, findWhat AnsiString, n Int32, m Int32)
Int32 INSTR(searchWhat String, findWhat String, n Int32, m Int32)

Arguments

  • searchWhat

    The string to search within. Must be a character string or an expression resulting in a character string.

  • findWhat

    The string to search for. Must be a character string or an expression resulting in a character string.

  • n

    Optional. Starting position for the search within the searchWhat string. If not specified, the search starts at the first character. Must be an integer.

  • m

    Optional. The occurrence number of the expression to find. If not specified, finds the first instance. Must be an integer.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in