[sqlite] Re: Re: Re: COLLATE without ORDER BY?

2007-05-25 Thread Igor Tandetnik
Jonas Sandman <[EMAIL PROTECTED]> wrote: ext1 is one type of extension, in my case 'mp3'. I guess it doesn't make sense when you have only one, but potentially there can be a lot more there. ('mp3', 'ogg', 'flac') etc... And how exactly do you plan to specify such a list in a parameter?

Re: [sqlite] Re: Re: COLLATE without ORDER BY?

2007-05-25 Thread Jonas Sandman
:ext1 is one type of extension, in my case 'mp3'. I guess it doesn't make sense when you have only one, but potentially there can be a lot more there. ('mp3', 'ogg', 'flac') etc... Unfortunately, "COLLATION STRIP_ACCENT LIKE" doesn't seem to trigger anything either. What makes me the most

Re: [sqlite] Re: COLLATE without ORDER BY?

2007-05-25 Thread Jonas Sandman
Thanks for the fast response Igor! However, I tried this prepared statement: SELECT f.fileid, f.path, m.title, m.artist, m.album, m.genre, m.comment, m.track, m.year, m.length, m.bitrate, m.playcount, f.changed, f.size, m.tagged FROM Files f, Meta m WHERE m.fileid=f.fileid AND

[sqlite] Re: COLLATE without ORDER BY?

2007-05-25 Thread Igor Tandetnik
Jonas Sandman <[EMAIL PROTECTED]> wrote: Can I make SQLite use a collation function when making a simple query? Before sending the data to LIKE I could override and for example strip the accent (*á' would become 'a' and 'é' would become 'e' etc). Recent versions of SQLite support syntax like

[sqlite] Documentation/specification of sqlite3_get_table/sqlite3_free_table

2007-05-25 Thread James Dennett
Hello, I have a couple of questions about the specification of sqlite3_get_table/sqlite3_free_table. I'm looking at the online docs at http://www.sqlite.org/capi3ref.html#sqlite3_get_table The questions are about when sqlite3_free_table() should be freed. Specifically: 1) Is it

RE: [sqlite] Why doesn't this UPDATE work?

2007-05-25 Thread Samuel R. Neff
Try this UPDATE table1 SET column3 = ( SELECT column3 FROM table2 WHERE table2.column1 = table1.column1 AND table2.column2 = table1.column2) HTH, Sam --- We're Hiring! Seeking a passionate developer to join our team

Re: [sqlite] index using and explain using question

2007-05-25 Thread Dennis Cote
dszhang wrote: > > by now the forst query is work well, but the second query is not,the second > query take about 5 times longer than the first one.i want to konw why? > i think may be the engine haven't use the index ,so i would prefer to ues > EXPLAIN syntax,but i don't know how to use it in C

Re: [sqlite] Unique Index not working properly

2007-05-25 Thread Tomash Brechko
On Fri, May 25, 2007 at 09:16:25 +0300, Cariotoglou Mike wrote: > > > Seems that there is a problem on unique key fields when null > > > values are allowed > > > > > > CREATE TABLE z ( > > > id VARCHAR(32) NOT NULL, > > > f1 VARCHAR(32) NOT NULL, > > > f2 VARCHAR(20), > > > PRIMARY KEY

RE: [sqlite] How can I get my query to run as fast as SQLiteSpy?

2007-05-25 Thread Brandon, Nicholas \(UK\)
> I have a simple table with five columns and 450,000 rows. In > SQLiteSpy, I can run "SELECT * FROM trend_data" and get all > 450,000 rows in 4.5 seconds. But in my program, if I use > sqlite3_prepare() and > sqlite3_step() until I run out of data, it takes 55 seconds > to get through all

[sqlite] Unique Index not working properly

2007-05-25 Thread Cariotoglou Mike
> > Seems that there is a problem on unique key fields when null > > values are allowed > > > > CREATE TABLE z ( > > id VARCHAR(32) NOT NULL, > > f1 VARCHAR(32) NOT NULL, > > f2 VARCHAR(20), > > PRIMARY KEY (id) > > ); > > CREATE UNIQUE INDEX z_I1 ON z (f1, f2) > > > > insert into z values