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
        2|bumm.krach.klong.schepper
        3|just.a.test.entry
        sqlite> select * from t2;
        1|kurz
        2|etwas laenger

Now I'd like to have a SELECT statement, which would return:

        1|foo.bar (kurz).boing
        2|bumm.krach.klong (etwas laenger).schepper

Ie., before the LAST ".", add what's in t2 but put it in
brackets (). It is so, that there are more values in t1, then
there are in t2. I only want to get those rows, which are
listed in t2.

        sqlite> select * from t1, t2 where t2.t1id = t1.id;
        1|foo.bar.boing|1|kurz
        2|bumm.krach.klong.schepper|2|etwas laenger

Is this doable in pure sqlite3, or would I need to "massage"
the returned data in a programming language?

Thanks,

Alexander Skwar

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to