Re: [sqlite] Temporary views across attached databases

2010-10-02 Thread Alexey Pechnikov
Persistent views across databases supported in old versions of SQLite and can be allowed in current version by this patch: http://sqlite.mobigroup.ru/fdiff?v1=b4464923c51570bev2=6d077a9491474827 Temp view across databases are supported always. 2010/10/1 John Drescher dresche...@gmail.com I see

Re: [sqlite] Tricky grouping query

2010-10-02 Thread luuk34
On 01-10-10 22:30, Igor Tandetnik wrote: Andy Chambersachambers.h...@gmail.com wrote: Given the following create table events ( id, date, status ); insert into events values ('001','a','N'); insert into events values ('001','b','N'); insert into events values ('001','c','Y');

Re: [sqlite] TestFixture 3.7.2 - Some WAL tests fail on QNX OS

2010-10-02 Thread Dan Kennedy
On Oct 1, 2010, at 2:20 PM, Raj, Praveen wrote: Hi, I'm validating SQLite test suite version 3.7.2 on QNX operating system. I have built the testfixture using SQLite amalgation file and other related files/libraries. I ran the full test suite and most of the test cases are passing,

[sqlite] Delete from A what is not in B

2010-10-02 Thread Fadhel Al-Hashim
Good day everyone. I have two tables that contain about 5 million records. I am trying to write an SQL command to delete rows from table A with PK (x,y,z) where PK (x,y,z) is not in table B. tried using NOT IN but my PK is composite. tryingA.xB.xANDA.yB.y ANDA.zB.z would

Re: [sqlite] Delete from A what is not in B

2010-10-02 Thread Igor Tandetnik
Fadhel Al-Hashim fad...@gmail.com wrote: I have two tables that contain about 5 million records. I am trying to write an SQL command to delete rows from table A with PK (x,y,z) where PK (x,y,z) is not in table B. delete from A where not exists (select 1 from B where A.x = B.x and A.y = B.y and

Re: [sqlite] Delete from A what is not in B

2010-10-02 Thread Drake Wilson
Quoth Fadhel Al-Hashim fad...@gmail.com, on 2010-10-02 14:51:59 +0300: tryingA.xB.xANDA.yB.y ANDA.zB.z would just hang. Huh? How are you using that expression? I'd use DELETE FROM a WHERE NOT EXISTS (SELECT * FROM b WHERE a.key = b.key) with a suitable composite

Re: [sqlite] Delete from A what is not in B

2010-10-02 Thread Fadhel Al-Hashim
I did not add indices on those columns assuming that being PK is enough? is that right? On Sat, Oct 2, 2010 at 3:08 PM, Drake Wilson dr...@begriffli.ch wrote: Quoth Fadhel Al-Hashim fad...@gmail.com, on 2010-10-02 14:51:59 +0300: tryingA.xB.xANDA.yB.y ANDA.zB.z would

Re: [sqlite] Delete from A what is not in B

2010-10-02 Thread Drake Wilson
Quoth Fadhel Al-Hashim fad...@gmail.com, on 2010-10-02 15:15:29 +0300: I did not add indices on those columns assuming that being PK is enough? is that right? Are you saying _both_ tables have that exact set of columns (ideally in the same order, too) as their respective primary keys? A

Re: [sqlite] Delete from A what is not in B

2010-10-02 Thread Simon Slavin
On 2 Oct 2010, at 1:15pm, Fadhel Al-Hashim wrote: I did not add indices on those columns assuming that being PK is enough? is that right? How did you define the primary keys ? Was it PRIMARY KEY (x,y,z) ? Simon. ___ sqlite-users mailing list

Re: [sqlite] errors after sqlite3_step

2010-10-02 Thread Dave Dyer
Ok, I'll settle for a list of the errors that can be returned by the standard codebase, and particularly what SQLITE_CANTOPEN means when the database clearly was already open. Also, this is coming from a SELECT query, so there should be no question of opening a transaction file.

Re: [sqlite] errors after sqlite3_step

2010-10-02 Thread Richard Hipp
On Sat, Oct 2, 2010 at 4:35 AM, Dave Dyer ddyer-sql...@real-me.net wrote: Ok, I'll settle for a list of the errors that can be returned by the standard codebase, and particularly what SQLITE_CANTOPEN means when the database clearly was already open. Also, this is coming from a SELECT query,

Re: [sqlite] errors after sqlite3_step

2010-10-02 Thread Dave Dyer
If the previous process to access the database was in the middle of a write but crashed before the write could complete, then your read-only process will still need to write to the database in order to clean up the mess left behind by the prior process before it can start its query. So perhaps

Re: [sqlite] errors after sqlite3_step

2010-10-02 Thread Dave Dyer
If the previous process to access the database was in the middle of a write but crashed before the write could complete, then your read-only process will still need to write to the database in order to clean up the mess left behind by the prior process before it can start its query. So perhaps

Re: [sqlite] FTS Question

2010-10-02 Thread Dami Laurent (PJ)
Hi Michael, While indexing, the standard tokenizer treats 'play-off' as two different words, so the indexing is exactly the same as for 'play off' or 'play, off'. Now when querying, the query analyzer treats the hyphen as 'AND NOT', so your query really becomes 'play AND NOT off', which

Re: [sqlite] errors after sqlite3_step

2010-10-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/02/2010 12:11 PM, Dave Dyer wrote: Neither of these fits the scenario, which is multiple readers contending for access to a networked disk. See the second paragraph of http://www.sqlite.org/faq.html#q5 People have repeatedly found that

Re: [sqlite] errors after sqlite3_step

2010-10-02 Thread Dave Dyer
2. If ignoring #1, prove that the network disk implementation is correct before blaming SQLite. Not trying to blame anyone here, just to gather information and ultimately find a reliable solution. 3. Watch out for other background tag-a-longs causing weird behaviour on Windows. I'm well

Re: [sqlite] errors after sqlite3_step

2010-10-02 Thread Simon Slavin
On 2 Oct 2010, at 10:01pm, Dave Dyer wrote: 2. If ignoring #1, prove that the network disk implementation is correct before blaming SQLite. Not trying to blame anyone here, just to gather information and ultimately find a reliable solution. No problem. It is unfortunate that most network

Re: [sqlite] errors after sqlite3_step

2010-10-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/02/2010 02:01 PM, Dave Dyer wrote: Not trying to blame anyone here, just to gather information and ultimately find a reliable solution. Your reliable solution is to not use networked filesystems with SQLite. Alternatives are using a database