0

I'm trying to order this set of rows, by the last path segment:

_data: /storage/emulated/0/Pictures _data: /storage/emulated/0/Music _data: /storage/emulated/0/Notifications _data: /storage/emulated/0/Pictures/picture.png

The result I'm wishing to achieve is

Music Notifications Pictures picture.png

I've tried to play around with sqlite instr function but unfortunately Android sqlite doesn't contain instr(x,y,z), which would allow to fetch the last string after /. It only contains instr(x,y).

How may I achieve this behaviour directly from the database query?

dwbrito
  • 5,194
  • 5
  • 32
  • 48

0 Answers0