devxlogo

Function Returning Character Position Within String

Function Returning Character Position Within String

Question:
Is there a function in Informix equivalent to Oracle’s instr() that returns the position of a character within a string? Also, is there a function that counts the number of times a given character repeats within a string?

Answer:
Neither of these Oracle-specific functions are SQL-92 compliant. Informix does not have them. You may be able to create a workaround by using a combination of the TRIM and LENGTH expressions.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist