[sqlite] Help with join

2011-02-17 Thread jeff archer
Here is my existing schema.  I would like to change this and remove the "NumDefects" from the [Analysis] table. To do this I need to update the [vwAnalysis] view to determine the number of defects from the [Defects] table by the AnalysisID. I can't seem to get the right select for the new

Re: [sqlite] pragma omit_readlock

2011-02-17 Thread Richard Hipp
On Thu, Feb 17, 2011 at 9:37 PM, Pavel Ivanov wrote: > > I'd appreciate it if anyone could let me know if this pragma still > > works and how to use it if so. > > You can get away without pragma. Just implement your own VFS which > will redirect all calls except lock-related

Re: [sqlite] pragma omit_readlock

2011-02-17 Thread Pavel Ivanov
> I'd appreciate it if anyone could let me know if this pragma still > works and how to use it if so. You can get away without pragma. Just implement your own VFS which will redirect all calls except lock-related to the standard VFS. Lock-related methods would be implemented as no-op and thus

Re: [sqlite] Speed up count(distinct col)

2011-02-17 Thread Yuzem
BareFeetWare-2 wrote: > > Oh, I see, so the "complication" is that you would have to change the > columns used in your bash script. That shouldn't be a big problem, but > I'll leave the bash script to you. > It isn't a big problem, the "complication" was to adapt all the tables and inserts and

[sqlite] pragma omit_readlock

2011-02-17 Thread Mike Lin
Dear all, I have a large SQLite database with genomic data which is strictly read-only at this point, and in direct spite of the FAQ I intend to query it concurrently on a network FS. Our parallel FS ought to be able to handle a heavy read workload from our cluster, based on past experience, but

Re: [sqlite] FTS slowdown with matchinfo

2011-02-17 Thread Iker Arizmendi
Dan Kennedy wrote: > On 02/17/2011 05:41 AM, Iker Arizmendi wrote: >> Dan Kennedy wrote: >>> Can you make the database available for download? And >>> supply the exact query you are using too? I'd like to >>> know why this is. Thanks. >>> >>> Dan. >>> >> You can find a tarball of the DB file here:

[sqlite] Problem with sqlite

2011-02-17 Thread Michel Di Croci
Hi everyone, I'm in the same situation as this person, http://www.mail-archive.com/sqlite-users@sqlite.org/msg08106.html I would like to know if it's feasible to user column alias in the same query... This old suggestion is correct in this example, but i have very long request so that's why I'm

Re: [sqlite] Question regarding SQLITE_CANTOPEN

2011-02-17 Thread Jay A. Kreibich
On Thu, Feb 17, 2011 at 04:01:39PM +0100, Sven L scratched on the wall: > > sqlite3* db = NULL; > if (sqlite3_open_v2(path, , SQLITE_OPEN_READWRITE, NULL) == > SQLITE_CANTOPEN) > { > // Ok, database does not exist. Still, db != NULL...? > ASSERT(db != NULL); > } > > Database cannot be

Re: [sqlite] Pivot table from multiple columns

2011-02-17 Thread Joe Bennett
Cool, thank you! This works perfect... Now I have to disect it and figure this syntax out more... Thanks to all for the education! -Joe On Wed, Feb 16, 2011 at 5:15 PM, Simon Davies wrote: > On 16 February 2011 23:00, Joe Bennett wrote: >

Re: [sqlite] Question regarding SQLITE_CANTOPEN

2011-02-17 Thread Richard Hipp
On Thu, Feb 17, 2011 at 10:01 AM, Sven L wrote: > > sqlite3* db = NULL; > if (sqlite3_open_v2(path, , SQLITE_OPEN_READWRITE, NULL) == > SQLITE_CANTOPEN) > { >// Ok, database does not exist. Still, db != NULL...? >ASSERT(db != NULL); > } > > Database cannot be

[sqlite] Question regarding SQLITE_CANTOPEN

2011-02-17 Thread Sven L
sqlite3* db = NULL; if (sqlite3_open_v2(path, , SQLITE_OPEN_READWRITE, NULL) == SQLITE_CANTOPEN) { // Ok, database does not exist. Still, db != NULL...? ASSERT(db != NULL); } Database cannot be opened, but we get an open handle to it... Please explain! Thanks.

Re: [sqlite] Referring to a column alias in the same query.

2011-02-17 Thread Igor Tandetnik
Michel Di Croci wrote: > I'm in the same situation as this person, > > http://www.mail-archive.com/sqlite-users-CzDROfG0BjIdnm+yROfE0A@public.gmane.org/msg08106.html > > I would like to know if it's feasible to user column alias in the same > query... Only via a

Re: [sqlite] SQLite on Custom OS

2011-02-17 Thread Simon Slavin
I can only answer two of those. > -> Suppose if I have a empty data base(test.db) created by Shell.c file > can I use the same database(test.db) in the custom OS? The format of a SQLite database file is the same on all platforms. You can create one on one platform, move it to another platform

[sqlite] SQLite on Custom OS

2011-02-17 Thread Anil A Kumar
Hello All, I am pretty new to SQLite and in the process of porting SQLite to a custom OS. After going through the link -> http://www.sqlite.org/custombuild.html I learnt that implementation is required in Sqlite.c -> sqlite_initialize( ) now the questions are: -> Is it required to follow

Re: [sqlite] How to use sqlite and pthread together?

2011-02-17 Thread Richard Hipp
On Wed, Feb 16, 2011 at 4:56 PM, Hailiang Shen wrote: > Dear All, > > I am trying to apply multiple threads with sqlite to just query (no insert, > update, delete operation) to compute objective values in optimization. But > I > cannot get it correct. I compiled pthread to a

[sqlite] How to use sqlite and pthread together?

2011-02-17 Thread Hailiang Shen
Dear All, I am trying to apply multiple threads with sqlite to just query (no insert, update, delete operation) to compute objective values in optimization. But I cannot get it correct. I compiled pthread to a dll for use with sqlite in VC++. I am using separate database connection for each

[sqlite] Referring to a column alias in the same query.

2011-02-17 Thread Michel Di Croci
Hi everyone, I'm in the same situation as this person, http://www.mail-archive.com/sqlite-users@sqlite.org/msg08106.html I would like to know if it's feasible to user column alias in the same query... This old suggestion is correct in this example, but i have very long request so that's why I'm

Re: [sqlite] foreign key on delete no action

2011-02-17 Thread BareFeetWare
>> 3. For backwards parsing compatibility, am I better off just leaving the >> action blank instead of explicitly writing "on delete no action"? > > Yes. Good plan. Great, thanks for the definitive response :-) Thanks, Tom BareFeetWare -- Comparison of SQLite GUI tools:

Re: [sqlite] FTS slowdown with matchinfo

2011-02-17 Thread Dan Kennedy
On 02/17/2011 05:41 AM, Iker Arizmendi wrote: > Dan Kennedy wrote: >> >> Can you make the database available for download? And >> supply the exact query you are using too? I'd like to >> know why this is. Thanks. >> >> Dan. >> > > You can find a tarball of the DB file here: > >