Index of substring in SQLite3? Index of substring in SQLite3? sqlite sqlite

Index of substring in SQLite3?


This is now possible using the builtin instr function.

sqlite> select instr(010000,11);0sqlite> select instr(011000,11);1sqlite> select instr(010110,11);3


Unfortunately, I think you've found the only answer that currently works. SQLite does not have a charindex equivalent function. You an make your own with length and trim, but nothing is built in:(