Find the position of the letter “t” in the string “Customer”.
SELECT InStr(“Customer”, “t”) AS MatchPosition; |
The InStr() function returns the position of the first occurrence of one string within another, performing a case-insensitive search.
InStr(start, string1, string2, compare) |
Parameter | Description |
start | Optional. Specifies the starting position for the search, with the default being position 1. |
String1 | Required. Specifies the string in which to search. |
String2 | Required. Specifies the string to be searched for. |
compare | Optional. Specifies the type of string comparison to use. Possible values:
-1: Use the setting of Option Compare 0: Binary comparison 1: Textual comparison 2: Database-specific comparison
|
Works in: |
From Access 2000 |