LunaVulpo
LunaVulpo

Reputation: 3211

How to find index of last occurrence of a substring using sqlite?

I want to find last occurrence of space in path which is stored in _data column. But I couldn't find any lastof(X,Y) function or even reverse(X).

Is it possible? How?

Upvotes: 0

Views: 664

Answers (1)

CL.
CL.

Reputation: 180020

There is no such built-in SQL function, and the Android database API does not allow creating user-defined SQL functions; you have to search for the space in your Java code.

Upvotes: 1

Related Questions