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

PI OLEDB Enterprise

INSTR

  • Last UpdatedSep 29, 2022
  • 1 minute read

Int32 INSTR(s1 String, s2 String, n Int32, m Int32)
Int32 INSTR(s1 String, s2 String, n Int32)
Int32 INSTR(s1 String, s2 String)

Int32 INSTR(s1 WString, s2 WString, n Int32, m Int32)
Int32 INSTR(s1 WString, s2 WString, n Int32)
Int32 INSTR(s1 WString, s2 WString)

Search string s2 in string s1 from the nth position the mth occurrence (default for n and m is 1), result is the position found in s1 or 0.

2013-07-03 cg I am having trouble understanding this sentence. Does it mean: "Search string1 for the mth occurrence of string2. Start the search at the nth character of string1."? Also, should the n and m parameters be enclosed in square brackets in the codeblock because they are optional?

N and m must have values >= 1, otherwise the result is NULL.

The search is case insensitive.

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