Tag: IBM

Community

LOCATE function in DB2 LUW

We had discussed the CHARINDEX() function in the previous post. Similar to the INSTR (Oracle) and CHARINDEX (MS SQL Server) functions, DB2 has a LOCATE function to search for a string within another string. It returns the starting position of the search string if it finds it within the string, else