I think you just need to implement an INSTR(x,y,z) where X is the input string.
Y is the search string, and z is the search starting location. Typically
negative numbers indicate the end of the string to search backwards.
So
Substr(t1.col, 0, instr(t1.col, '.', -1) ) || '(' t2.col ||')'
Daniel Önnerby schrieb:
This should be a simple task for any programming language to do once the
results has been retrieved.
Yes, of course. But it would be nice, if that could be done
on SQL level.
With the current expressions in SQLite I believe there is no way to do
this unless you extend
This should be a simple task for any programming language to do once the
results has been retrieved.
With the current expressions in SQLite I believe there is no way to do
this unless you extend SQLite with your own "string_find_last" or
"replace_last" function.
Alexander Skwar wrote:
Hello.
Hello.
Suppose I've got tables like this:
sqlite> .schema t1
CREATE TABLE t1 (id integer primary key not null, name);
sqlite> .schema t2
CREATE TABLE t2 (t1id integer, txt STRING NOT NULL);
Filled with:
sqlite> select * from t1;
1|foo.bar.boing
4 matches
Mail list logo