Re: [sqlite] Finding Missing Table Rows -- FOUND

2008-05-16 Thread Rich Shepard
On Thu, 15 May 2008, Darren Duncan wrote: > Try this: > > (select f.parent as c1, f.subcomp as c2, f.comp as c3 > from Fuzzyset as f) > minus > (select r.var_name as c1, r.subcomp_name as c2, r.comp_name as c3 > from Rules as r) > > The result should have 3 columns and 2 rows. Darren, I see

Re: [sqlite] Finding Missing Table Rows -- FOUND

2008-05-16 Thread twright
*** Automatic Responder *** Thanks for your email! I will be out (on vacation) until Thursday May 18th. Please contact me after Thursday. Sincerely, Thom Wright ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Finding Missing Table Rows -- FOUND

2008-05-16 Thread twright
*** Automatic Responder *** Thanks for your email! I will be out (on vacation) until Thursday May 18th. Please contact me after Thursday. Sincerely, Thom Wright ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Locking causing exponentially degraded peformance with multiple processes

2008-05-16 Thread John Stanton
By using BEGIN IMMEDIATE you lose any chance of concurrency. Samuel Neff wrote: > We're running into a lot of very slow queries and db locks when running with > multiple processes accessing the same database. As a test we created a > small application that has only two threads and a small single

[sqlite] One sqlite*, multiple threads

2008-05-16 Thread Jeffrey Rennie
I looked in the documentation, and scanned the source code, but haven't yet been able to answer this question for myself: If two threads are simultaneously trying to execute READ transactions on a shared sqlite*, will they both progress simultaneously? Or will it be one after the other? In

Re: [sqlite] One sqlite*, multiple threads

2008-05-16 Thread Jeff Hamilton
If you're using the same database connection they will not progress simultaneously, you need one connection per thread for that to work. -Jeff On Fri, May 16, 2008 at 8:00 AM, Jeffrey Rennie <[EMAIL PROTECTED]> wrote: > I looked in the documentation, and scanned the source code, but haven't yet

Re: [sqlite] Locking causing exponentially degraded peformance with multiple processes

2008-05-16 Thread Samuel Neff
Yes, for write transactions, begin immediate will cause the second write transaction to wait on the first. However, the reads are done without an explicity transaction so the reads should still proceed while the writes have a reserved lock in place, right? And even if there is no concurrency, at

[sqlite] Timestamp DataType

2008-05-16 Thread Joanne Pham
Hi All, As mentioned in the document of SQLite the list below is all the datatype of SQLite. How about Timestamp  fromat? Can we havethe column's datatype as Timestamp . Thanks, JP * NULL. The value is a NULL value. * INTEGER. The value is a signed integer, stored in 1, 2, 3, 4,

Re: [sqlite] Timestamp DataType

2008-05-16 Thread Scott Baker
Joanne Pham wrote: > Hi All, > As mentioned in the document of SQLite the list below is all the datatype of > SQLite. > How about Timestamp fromat? Can we havethe column's datatype as Timestamp . Datatypes aren't strictly enforced like other databases. If you insert the date as a format SQLite

Re: [sqlite] Timestamp DataType

2008-05-16 Thread Joanne Pham
Thanks a lot Scott. How about the size of columns which have the date as a format vs. the columns which have INTEGER format. Which one of them need more space. Thanks, Joanne - Original Message From: Scott Baker <[EMAIL PROTECTED]> To: General Discussion of SQLite Database

[sqlite] Exceptions to sorting?

2008-05-16 Thread Andrés G. Aragoneses
Hello, I am querying a list of elements and some of them are blank (''). However, I want that those who are blank appear as the last (instead of the first) elements when I sort with ORDER BY alphabetically. How can I do this with just SQL? Thanks, Andres --

[sqlite] Calculating Difference between Time using SQLite

2008-05-16 Thread Miguel
Estimates, First of all, excuse my English, I recognise that it is not my strong. I need to do a query on a table and I return the difference in minutes between two times loaded in the table. Which would be the best way to make these differences. Since already thank you very much and greetings.

Re: [sqlite] Calculating Difference between Time using SQLite

2008-05-16 Thread Scott Baker
Miguel wrote: > Estimates, > First of all, excuse my English, I recognise that it is not my strong. > I need to do a query on a table and I return the difference in minutes > between > two times loaded in the table. > Which would be the best way to make these differences. > Since already thank

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Andrés G. Aragoneses
Igor Tandetnik wrote: > "Andrés G. Aragoneses" <[EMAIL PROTECTED]> > wrote: >> Hello, I am querying a list of elements and some of them are blank >> (''). However, I want that those who are blank appear as the last >> (instead of the first) elements when I sort with ORDER BY >> alphabetically. How

Re: [sqlite] Calculating Difference between Time using SQLite

2008-05-16 Thread P Kishor
On 5/16/08, Scott Baker <[EMAIL PROTECTED]> wrote: > Miguel wrote: > > Estimates, > > First of all, excuse my English, I recognise that it is not my strong. > > I need to do a query on a table and I return the difference in minutes > > between > > two times loaded in the table. > > Which

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Igor Tandetnik
"Andrés G. Aragoneses" <[EMAIL PROTECTED]> wrote: > Igor Tandetnik wrote: >> "Andrés G. Aragoneses" >> <[EMAIL PROTECTED]> wrote: >>> Hello, I am querying a list of elements and some of them are blank >>> (''). However, I want that those who are blank appear as the last >>> (instead of the first)

Re: [sqlite] sqlite3_transfer_bindings obsolete?

2008-05-16 Thread Shawn Wilsher
And a fun follow-up question. Will sqlite3_transfer_bindings transfer bindings across connection objects if the two statements are for two different connections to the same database? Cheers, Shawn On Tue, May 13, 2008 at 2:05 PM, Shawn Wilsher <[EMAIL PROTECTED]> wrote: > I was looking through

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Andrés G. Aragoneses
Andrés G. Aragoneses wrote: > Igor Tandetnik wrote: >> "Andrés G. Aragoneses" <[EMAIL PROTECTED]> >> wrote: >>> Hello, I am querying a list of elements and some of them are blank >>> (''). However, I want that those who are blank appear as the last >>> (instead of the first) elements when I sort

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Petite Abeille
On May 16, 2008, at 10:23 PM, Andrés G. Aragoneses wrote: > If I use "ORDER BY ItemName = '', ItemNameLowered" I get 2,1,3 and I > want to get 1,3,2. Any ideas? Perhaps something like: select * from item order by case when name = '' then 'z' else name end

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Igor Tandetnik
"Andrés G. Aragoneses" <[EMAIL PROTECTED]> wrote: > Andrés G. Aragoneses wrote: >> Igor Tandetnik wrote: >>> "Andrés G. Aragoneses" >>> <[EMAIL PROTECTED]> wrote: Hello, I am querying a list of elements and some of them are blank (''). However, I want that those who are blank appear as

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Andrés G. Aragoneses
Petite Abeille wrote: > On May 16, 2008, at 10:23 PM, Andrés G. Aragoneses wrote: > >> If I use "ORDER BY ItemName = '', ItemNameLowered" I get 2,1,3 and I >> want to get 1,3,2. Any ideas? > > Perhaps something like: > > select * > from item > order by case > when name = ''

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Igor Tandetnik
Petite Abeille <[EMAIL PROTECTED]> wrote: > On May 16, 2008, at 10:23 PM, Andrés G. Aragoneses wrote: > >> If I use "ORDER BY ItemName = '', ItemNameLowered" I get 2,1,3 and I >> want to get 1,3,2. Any ideas? > > Perhaps something like: > > select * > from item > order by case >when name =

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Andrés G. Aragoneses
Igor Tandetnik wrote: > "Andrés G. Aragoneses" <[EMAIL PROTECTED]> > wrote: >> Andrés G. Aragoneses wrote: >>> Igor Tandetnik wrote: "Andrés G. Aragoneses" <[EMAIL PROTECTED]> wrote: > Hello, I am querying a list of elements and some of them are blank > (''). However, I want that

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Petite Abeille
On May 16, 2008, at 10:41 PM, Igor Tandetnik wrote: > That would sort 'zebra' after ''. Well... this is meant as an example... 'z' should be whatever character one deems appropriate, e.g. '{' or whatever utf-8 sequence does the job. -- PA. http://alt.textdrive.com/nanoki/

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Petite Abeille
On May 16, 2008, at 10:40 PM, Andrés G. Aragoneses wrote: > Interesting, but the replacement to 'z' seems kind of a hack, I would > not prefer magic strings... Well... it doesn't have to be 'z'... it's just an example... choose whatever character sequence is relevant to get the proper

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Igor Tandetnik
"Andrés G. Aragoneses" <[EMAIL PROTECTED]> wrote: > Igor Tandetnik wrote: >> "Andrés G. Aragoneses" >> <[EMAIL PROTECTED]> wrote: >>> Andrés G. Aragoneses wrote: Igor Tandetnik wrote: > "Andrés G. Aragoneses" > <[EMAIL PROTECTED]> wrote: >> Hello, I am querying a list of elements

Re: [sqlite] Exceptions to sorting?

2008-05-16 Thread Igor Tandetnik
Petite Abeille <[EMAIL PROTECTED]> wrote: > On May 16, 2008, at 10:41 PM, Igor Tandetnik wrote: > >> That would sort 'zebra' after ''. > > Well... this is meant as an example... 'z' should be whatever > character one deems appropriate, e.g. '{' or whatever utf-8 sequence > does the job. Well, for

[sqlite] interrupting sqlite3_prepare_v2

2008-05-16 Thread Daniel Önnerby
Hi all! My application is running all my SQLite stuff on one thread and sometimes I run a sqlite3_interrupt from another thread to cancel the current execution. Sometimes this interrupt occur in the middle of a sqlite3_prepare_v2 and in some cases this will cause my application to break in

Re: [sqlite] interrupting sqlite3_prepare_v2

2008-05-16 Thread Daniel Önnerby
Forgot to say that I'm using SQLite 3.5.9 compiled from the amalgamation with threadsafety on. Daniel Önnerby wrote: > Hi all! > > My application is running all my SQLite stuff on one thread and > sometimes I run a sqlite3_interrupt from another thread to cancel the > current execution.

[sqlite] seg fault using 3.5.9

2008-05-16 Thread Ken
Hi all.. This is probably an issue in my code but I thought i'd report it just the same. After upgrading to version 3.5.9 i get the following gdb output: Program terminated with signal 11, Segmentation fault. #0 0x0046b709 in sqlite3OsWrite () Regards, Ken

[sqlite] indexing rows from a query

2008-05-16 Thread jsg72
Sorry if this is a silly question - I don't have much experience with databases. Say I have a table with many (millions+) of rows and I have a query: SELECT * FROM mytable WHERE some_condition ORDER BY rowid First, I'm assuming that in addition to whatever time some_condition takes, I'll

Re: [sqlite] indexing rows from a query

2008-05-16 Thread Scott Baker
[EMAIL PROTECTED] wrote: > Sorry if this is a silly question - I don't have much experience with > databases. > > Say I have a table with many (millions+) of rows and I have a query: > > SELECT * FROM mytable WHERE some_condition ORDER BY rowid > > First, I'm assuming that in addition to

Re: [sqlite] indexing rows from a query

2008-05-16 Thread Igor Tandetnik
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My real question is if there is an efficient way to index the results > of such a query. In other words, I'm looking for rows N through N+100 > of the result. Can I do much better than just executing the query and > throwing away the

Re: [sqlite] indexing rows from a query

2008-05-16 Thread Jay A. Kreibich
On Fri, May 16, 2008 at 04:44:10PM -0700, [EMAIL PROTECTED] scratched on the wall: > Sorry if this is a silly question - I don't have much experience with > databases. > > Say I have a table with many (millions+) of rows and I have a query: > > SELECT * FROM mytable WHERE some_condition ORDER

Re: [sqlite] indexing rows from a query

2008-05-16 Thread jsg72
On May 16, 2008, at 5:04 PM, Jay A. Kreibich wrote: > On Fri, May 16, 2008 at 04:44:10PM -0700, [EMAIL PROTECTED] scratched on > the wall: >> Sorry if this is a silly question - I don't have much experience with >> databases. >> >> Say I have a table with many (millions+) of rows and I have a

[sqlite] Limitation of sqlite3_last_insert_rowid()

2008-05-16 Thread Joanne Pham
U12232 If a separate thread does a new insert on the same database connection while the sqlite3_last_insert_rowid() function is running and thus changes the last insert rowid, then the value returned by sqlite3_last_insert_rowid() is unpredictable and might not equal either the old or the new

Re: [sqlite] Timestamp DataType

2008-05-16 Thread John Stanton
A timestamp is a REAL. Joanne Pham wrote: > Hi All, > As mentioned in the document of SQLite the list below is all the datatype of > SQLite. > How about Timestamp fromat? Can we havethe column's datatype as Timestamp . > Thanks, > JP > * NULL. The value is a NULL value. > * INTEGER.

[sqlite] What is the PDO last_insert_id method???`

2008-05-16 Thread Skip Evans
Hey all, I'm new to SQLite and having a heck of a time finding the equivalent to MySQL's mysql_insert_id(). I'm using SQLite with PDO in PHP5. -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out

Re: [sqlite] FOUND IT!!! What is the PDO last_insert_id method???`

2008-05-16 Thread Skip Evans
Hey all, Found the PHP site page with all the PDO functions... gadzoooks! Skip Skip Evans wrote: > Hey all, > > I'm new to SQLite and having a heck of a time > finding the equivalent to MySQL's > > mysql_insert_id(). > > I'm using SQLite with PDO in PHP5. -- Skip Evans Big Sky

Re: [sqlite] What is the PDO last_insert_id method???`

2008-05-16 Thread John Stanton
Maybe last_rowid is what you are after. Skip Evans wrote: > Hey all, > > I'm new to SQLite and having a heck of a time > finding the equivalent to MySQL's > > mysql_insert_id(). > > I'm using SQLite with PDO in PHP5. ___ sqlite-users mailing list

[sqlite] select userfunc(*)

2008-05-16 Thread Bradley Smith
Why does a user defined function receive zero arguments when used in the following expression? select userfunc(*) from t; Assuming table t was created with create table t (a, b); insert into t values(1, 'first'); insert into t values(2, 'second'); Thanks, Bradley

Re: [sqlite] select userfunc(*)

2008-05-16 Thread Igor Tandetnik
"Bradley Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why does a user defined function receive zero arguments when used in > the following expression? > > select userfunc(*) from t; Why would you expect otherwise? The only precedent in standard SQL for a syntax like

Re: [sqlite] Help!!! sqlite 3.5.8 crash: access violation

2008-05-16 Thread qinligeng
The attachment size limitation of the bug report is 100k :( - Original Message - From: "Dennis Cote" <[EMAIL PROTECTED]> To: "General Discussion of SQLite Database" Sent: Thursday, May 15, 2008 9:49 PM Subject: Re: [sqlite] Help!!! sqlite 3.5.8 crash: access

Re: [sqlite] select userfunc(*)

2008-05-16 Thread Bradley Smith
Igor Tandetnik wrote: > Bradley Smith wrote: >> Why does a user defined function receive zero arguments when used in >> the following expression? >> >> select userfunc(*) from t; > > Why would you expect otherwise? The only precedent in standard SQL for a > syntax like this is count(*), which