Another method beyond what was suggested above/below would be that since
the / could be considered a delimiter, you could consider each field a word
and insert each word into a separate table and index each word. Have
another table reference the indexed word to match whatever table you've
On Sun, 26 Oct 2014 15:27:24 +0300
Baruch Burstein wrote:
> I need to get the path with the
> first 2 parts stripped off. Currently I am doing:
>
> substr(path, 4+instr(substr(path,4),'/'))
>
> But that seems long and probably inefficient.
> What is the
Sorry, this should rather be something like sqlite3_mprintf("%q",
"Path-_1/path%2/path3_³);
https://www.sqlite.org/c3ref/mprintf.html
Am 26.10.14 14:57 schrieb "Stadin, Benjamin" unter
:
>char *zSQL = sqlite3_mprintf("Path-_1/path%2/path3_", zText);
>
Hi,
One possible way could be to combine this with FTS4 (with parenthesis
support enabled) and a LIKE clause:
SELECT substr(path, 4+instr(substr(path,4),'/‚)) as relativepath FROM
table WHERE table MATCH "path:ab AND path:cd“ AND path LIKE "ab/cd%“
How it works:
- The match clause efficiently
Hi,
I don't know if the SQLite SQL function are coming from a sql specs standard.
I guess however that a better usable string function for manage paths
is one function that retrieve the last occurrence of a string.
Because very often the need is to extract the last part of a filepath.
my 2ct,
Hi!
I have a column which represents a file path:
ab/cd/gf
ab/qw/ert
ab/fgrd/ert
ab/foo/bar/fgr
ab/bar/foo/foobar/etc
ab/etc/d
etc...
I happen to know in my case that the first part of the path is a certain
fixed string ('ab' in the above example). I need to get the path with the
first 2 parts
6 matches
Mail list logo