SQL POSITION scalar function in DB2 for i SQL |
POSITION
The POSITION function returns the position of the first occurrence of the search string in the source string. If the search string is not found in the source string, then the result is 0.
Example
SELECT POSITION('TEST DATA', 'THIS is TEST DATA') , POSITION('TEST DATA', 'THIS is TEST') FROM sysibm.sysdummy1
Output:
POSITION function POSITION function 9 0