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)

CHARINDEX

  • Last UpdatedDec 19, 2022
  • 1 minute read

The CHARINDEX 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 within the second expression.

Syntax

Int32 CHARINDEX(findWhat AnsiString, searchWhat AnsiString)
Int32 CHARINDEX(findWhat String, searchWhat String)
Int32 CHARINDEX(findWhat AnsiString, searchWhat AnsiString, n Int32)
Int32 CHARINDEX(findWhat String, searchWhat String, n Int32)

Arguments

  • findWhat

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

  • searchWhat

    The string to search within. 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.

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