RE: [sqlite] use of sqlite in a multithread C application

2007-03-02 Thread Rafi Cohen
Thanks Denis, this helped a lot and actually that's what I was thinking to do. Another question: may I prepare all statements tha need to be prepared in one thread, but for part of them apply the execution process (bind-step-reset) I n the second thread or whould it be best to prepare statements

RE: [sqlite] Re: Any way to know the numbers of rows affected by a cmd?

2007-03-02 Thread Anderson, James H \(IT\)
Exactly what I was hoping for! Thanks very much. -Original Message- From: Griggs, Donald [mailto:[EMAIL PROTECTED] Sent: Thursday, March 01, 2007 6:39 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] Re: Any way to know the numbers of rows affected by a cmd? Regarding: Anderson,

Re: [sqlite] Custom collate - on field or index or both?

2007-03-02 Thread jp
--- Dan Kennedy [EMAIL PROTECTED] wrote: On Thu, 2007-03-01 at 15:13 -0800, jp wrote: Hi, I have a custom collation sequence (e.g. mycollate). Are there any advantages in terms of performance of declaring this collation at the table level, instead of just at the index level?

[sqlite] Top 10 distinct record count

2007-03-02 Thread Hikka W
Dear list Quite new to sqlite/sql - and just signed the list. Have a logtable where I need a TOP 10 output of the most representet field 'file' WHERE the field 'type' is specific. 'file' is the text of a filepath or name, and 'type' is also text... I relize by searching the list that LIMIT can

Re: [sqlite] Top 10 distinct record count

2007-03-02 Thread Brodie Thiesfield
Perhaps this is what you are after? select file, count(file) from logtable where type = 'specific' group by file order by 2 desc limit 10; Hikka W wrote: Dear list Quite new to sqlite/sql - and just signed the list. Have a logtable where I need a TOP 10 output of the most representet field

Re: [sqlite] Top 10 distinct record count

2007-03-02 Thread Hikka W
Brodie, :) That was very fast - and exactly the needed call. Tks. a lot. 2007/3/2, Brodie Thiesfield [EMAIL PROTECTED]: Perhaps this is what you are after? select file, count(file) from logtable where type = 'specific' group by file order by 2 desc limit 10; Hikka W wrote: Dear list

Re: [sqlite] use of sqlite in a multithread C application

2007-03-02 Thread Dennis Cote
Rafi Cohen wrote: Another question: may I prepare all statements tha need to be prepared in one thread, but for part of them apply the execution process (bind-step-reset) I n the second thread or whould it be best to prepare statements in the same thread I intend to execute them later?

Re: [sqlite] use of sqlite in a multithread C application

2007-03-02 Thread Rich Rattanni
Rafi, Do not forget that if you do prepare and perform an execute in different threads, that you should not attempt to execute multiple statements compiled against the same sqlite3 database pointer concurrently. Trust me, I made this mistake. If you are preparing multiple statements, make

Re: [sqlite] Custom collate - on field or index or both?

2007-03-02 Thread Dennis Cote
Dan Kennedy wrote: On Thu, 2007-03-01 at 15:13 -0800, jp wrote: Hi, I have a custom collation sequence (e.g. mycollate). Are there any advantages in terms of performance of declaring this collation at the table level, instead of just at the index level? For example, if I have: CREATE

[sqlite] Re: Custom collate - on field or index or both?

2007-03-02 Thread Igor Tandetnik
jp sqlamigo-/[EMAIL PROTECTED] wrote: So, is creating an index with collate useless if you didn't specify the collate at the table level? Not entirely useless: the index may still be used to satisfy ORDER BY field COLLATE collation clause. Also, Dr. Hipp appears to be working on allowing

[sqlite] SQLite on ARM9 running Linux

2007-03-02 Thread Korey Calmettes
I am planning an embedded project using SQLite an a Cirrus Logic EP9301. I am curious of any difficulties that have been found in either compiling and/or using SQLite in this environment. Thanks for any input that you can provide, Korey

Re: [sqlite] SQLite on ARM9 running Linux

2007-03-02 Thread Rich Rattanni
My co-worker did a lot of work on OpenEmbedded, I know he just pushed the latest patch for the latest SQLite snapshot into OE. If you hardware is supported by OE I would suggest you take a look. I am writing an application to run on this platform and everything is working wonderfully. On

[sqlite] Difference between DATETIME datatype and TIMESTAMP

2007-03-02 Thread Rich Rattanni
I was wondering what the differences were (storage, efficiency, usefulness) between the DATETIME field and TIMESTAMP field in sqlite?

Re: [sqlite] Difference between DATETIME datatype and TIMESTAMP

2007-03-02 Thread Dennis Cote
Rich Rattanni wrote: I was wondering what the differences were (storage, efficiency, usefulness) between the DATETIME field and TIMESTAMP field in sqlite? Rich, SQLite doesn't support SQL date or time types. For more details see this post

Re: [sqlite] Custom collate - on field or index or both?

2007-03-02 Thread jp
Thanks all! This worked (winxp, sqlite 3.3.13) and does use the index: SELECT lastname FROM people WHERE country_id='US' AND lastname COLLATE mycollate 'A' ORDER BY country_id,lastname COLLATE mycollate LIMIT 100; jp --- Dennis Cote [EMAIL PROTECTED] wrote: Dan Kennedy wrote: On

[sqlite] custom collation problem with delphi

2007-03-02 Thread jp
I have a custom collation which worked well in 3.3.6, but now gives random errors on 3.3.13. Might just be coincidence but wanted to get feedback from the community. Under random circumstances, my Delphi function (compare function defined in sqlite3_create_collation) doesn't seem to receive the

Re: [sqlite] Extension functions for SQLite in C for free

2007-03-02 Thread TB
Last month, Mikey C wrote (in part): I've had these functions hanging around for some time... if anyone wants the code, please take it. I have all the code as a MS Visual Studio 2003 project. It is based on source code 3.3.5 replace(X,Y,Z) Returns the string X with every occurence of Y

[sqlite] Question about regexp function

2007-03-02 Thread Neil McLeod
Hello, I understand from the SQLite documentation that no regular expression function is defined by default in SQLite. I have seen scripts that define a regular expression function in Python or PHP, and use that in their SQLite query as the REGEXP function. However, I would like to perform