Find the position of the letter “t” in the string “Customer”, searching from the end of the string towards the beginning.
SELECT InstrRev(“Customer”, “t”) AS MatchPosition; |
The InstrRev() function retrieves the position of the last occurrence of a substring within another string, performing a case-insensitive search from the end of the string.
InstrRev(string1, string2, start, compare) |
Parameter |
Description |
string1 |
Required. Specifies the string within which to search. |
string2 |
Required. Specifies the substring to search for within another string. |
start |
Optional. Specifies the starting position for the search. The default is -1, indicating that the search starts from the last character position of the string. |
compare |
Optional. Specifies the type of string comparison to use. Possible values: -1: Use the setting from Option Compare |
Works in: |
From Access 2000 |