How to: |
The POSITION function returns the position within a character string of a specified substring. If the substring does not appear in the character string, the result is 0. Otherwise, the value returned is one greater than the number of characters in the string preceding the start of the first occurrence of the substring.
POSITION(substring IN arg)
where:
character string
Is the substring to search for.
character string
Is the string to be searched for the substring.
This function returns an integer value.
POSITION returns the position of a substring. This example,
POSITION ('A' IN 'AEIOU')
returns 1.
This example,
POSITION ('IOU' IN 'AEIOU')
returns 3.
This example,
POSITION ('Y' IN 'AEIOU')
returns 0.
iWay Software |