[sqlite] create View for four tables

2010-10-06 Thread Redhot
I need to pull information from 4 different tables. I read taht using the "Create View" is that best way for this. Can you let me now if my code is correct? CREATE TEMP VIEW TEBASdb.TwoYrExceptvw as SELECT tblinfoDataSheet.Issue_Price , tblinfoDataSheet.O_I_PremDisc ,

Re: [sqlite] Slow operation

2010-10-06 Thread Simon Slavin
On 7 Oct 2010, at 1:46am, Jay A. Kreibich wrote: > Much of the big "No-SQL" movement does exactly this. > The big secret is that most of these applications are still doing > relational data operations, they're just pushing the manipulations > (such as a JOIN) down into the client code, making

Re: [sqlite] Slow operation

2010-10-06 Thread Jay A. Kreibich
On Tue, Oct 05, 2010 at 03:44:38PM +0100, Ian Hardingham scratched on the wall: > Hey Jay, thanks for your feedback. > > I am indeed using (several) delineated lists. I would very much > appreciate your input into how bad a decision this is. I hesitate to call it a bad decision, so much as

[sqlite] how do I get the FTS3 "malformed MATCH expression" error message?

2010-10-06 Thread Sam Roberts
>From the command line, I see: sqlite> SELECT section, count(*) FROM 'index' WHERE name MATCH '"*' GROUP BY section; Error: malformed MATCH expression: ["*] But when I do a prepare/step, I get a much less informative message: int result = sqlite3_prepare_v2(routeDb, sql, -1, , NULL );

Re: [sqlite] When do I need SQLITE_THREADSAFE?

2010-10-06 Thread Jay A. Kreibich
On Wed, Oct 06, 2010 at 08:07:00AM +0200, Michele Pradella scratched on the wall: > So let me know if I understand: > > 1. SQLITE_THREADSAFE=0: lock are disabled at all, and you can use > this if the application is not multi thread, so if there's only > one thread that can use the

[sqlite] NanoStore has moved to Google Code

2010-10-06 Thread Tito Ciuro
Hello everyone, Based on feedback from other developers, I have decided to move NanoStore, a Cocoa wrapper for SQLite, to Google Code: http://code.google.com/p/nanostore/ The Sourceforge repository is now considered obsolete and will be removed shortly. Regards, -- Tito

[sqlite] Is this the same bug as in ticket 13137dccf3?

2010-10-06 Thread Wanadoo Hartwig
These statements CREATE TABLE Simple (ID integer primary key, Name text); CREATE VIRTUAL TABLE SimpleFTS USING FTS3 (Name); CREATE TRIGGER DeleteTrigger AFTER DELETE ON Simple FOR EACH ROW BEGIN DELETE FROM SimpleFTS WHERE (rowid=OLD.ID); END; CREATE TRIGGER InsertTrigger AFTER INSERT ON Simple

Re: [sqlite] Date range based on Date in different table

2010-10-06 Thread Igor Tandetnik
Redhot wrote: > I would like select a date range (from/To) from a date database selection. > The user enters a date (ProcessDate) in the database. ProcessDate is stored > in table (tblData). I would like to get from another table (TblFund) the > Rows that match the data

Re: [sqlite] Errors after upgrade from 3.6.22 to 3.7.2

2010-10-06 Thread list67
Here is some more info abut the new winAccess errors. The errors are occuring with a Windows7 64-bit SQLite-dependent application. The SQLite .db files are on a Windows Server 2003 shared drive. The GetLastError that winAccess(...) is detecting is: ERROR_BAD_NET_RESP 58 (0x3A) The specified

Re: [sqlite] Bug? LIMIT in compound statement with UNION ALL seems to affect only the first SELECT statement if it has ORDER BY

2010-10-06 Thread Pavel Ivanov
I can't say anything about your particular issue with the LIMIT clause, maybe that's a bug. But > Another solution is to use UNION instead of UNION ALL. But I can't use that, > because UNION does not respect ORDER BY in sub-statements (not sure if it's > a correct behavior). Do you know that

Re: [sqlite] Bug? LIMIT in compound statement with UNION ALL seems to affect only the first SELECT statement if it has ORDER BY

2010-10-06 Thread Igor Tandetnik
Yuri G wrote: > This looks like a bug to me: > > --sql: > > CREATE TABLE t(a INTEGER); > > INSERT INTO "t" VALUES(1); > INSERT INTO "t" VALUES(2); > INSERT INTO "t" VALUES(3); > INSERT INTO "t" VALUES(4); > > SELECT * FROM ( > SELECT >a > FROM t > WHERE a<=2 >

Re: [sqlite] SQLite database sync

2010-10-06 Thread Simon Slavin
On 6 Oct 2010, at 4:50pm, David Haymond wrote: > If I copy, I don't want to transfer EVERY record to the server each time I > sync, because that would be a waste of bandwidth. What is the best way to > copy only those records that have changed to the server? Make a new column for each table,

[sqlite] antivirus scanner/windows lock interference problem

2010-10-06 Thread Noam Solomon
I'm trying to debug an intermittent problem some of our customers are encountering when running a sync client on Windows 7 tablets. The sync client is written with python 2.5 and uses the sqlite3 module to maintain a sqlite database file in the user's ApplicationData directory. During sync, the

[sqlite] Bug? LIMIT in compound statement with UNION ALL seems to affect only the first SELECT statement if it has ORDER BY

2010-10-06 Thread Yuri G
Hi, everyone, This looks like a bug to me: --sql: CREATE TABLE t(a INTEGER); INSERT INTO "t" VALUES(1); INSERT INTO "t" VALUES(2); INSERT INTO "t" VALUES(3); INSERT INTO "t" VALUES(4); SELECT * FROM ( SELECT a FROM t WHERE a<=2 ORDER BY a) UNION ALL SELECT * FROM ( SELECT

Re: [sqlite] SQLite database sync

2010-10-06 Thread Gerry Snyder
Keep track of changes, keep track of backups. On 10/6/10, David Haymond wrote: > If I copy, I don't want to transfer EVERY record to the server each time I > sync, because that would be a waste of bandwidth. What is the best way to > copy only those records that have

Re: [sqlite] SQLite database sync

2010-10-06 Thread David Haymond
If I copy, I don't want to transfer EVERY record to the server each time I sync, because that would be a waste of bandwidth. What is the best way to copy only those records that have changed to the server? David -Original Message- From: Simon Slavin Sent: Wednesday, October 06, 2010

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

2010-10-06 Thread Dan Kennedy
On Oct 6, 2010, at 9:39 PM, Raj, Praveen wrote: > Hi Dan, > > For debugging purpose we use the QNX Momentics which is the IDE > provided by QNX. I believe to certain extent > we should be able to debug the issue using IDE. In what situations > does the shared memory block be zeroed. > I

Re: [sqlite] Reading committed / uncommitted records

2010-10-06 Thread Pavel Ivanov
> 2. In between with another statement handle if I update the table, here I > am updating the record which is just fetches by my cursor mentioned in > step 1. You shouldn't do that. It's a bad idea in general and it leads to undefined results in SQLite specifically. > - Ultimately, its fetching

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

2010-10-06 Thread Raj, Praveen
Hi Dan, For debugging purpose we use the QNX Momentics which is the IDE provided by QNX. I believe to certain extent we should be able to debug the issue using IDE. In what situations does the shared memory block be zeroed. I believe it should be zeroed when the db is closed or when WAL file is

[sqlite] Reading committed / uncommitted records

2010-10-06 Thread Abhijeet Shiral
Following is the scenario 1. I have a cursor open for the table and records are being fetched. Here are the steps. - Prepare the statements - Perform sqlite3_step ( ). 2. In between with another statement handle if I update the table, here I am updating the record which is just fetches by my

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

2010-10-06 Thread Dan Kennedy
On Oct 6, 2010, at 8:15 PM, Raj, Praveen wrote: > Hello, > > I'm new to SQLite, so not sure what is the behavior of these failed > tests on Unix/Linux. Are they successfully passing all the WAL > journal mode tests on Unix? > > What could be happening when the shared memory (-shm file) is

Re: [sqlite] SQLite database sync

2010-10-06 Thread Simon Slavin
On 6 Oct 2010, at 1:29pm, David Haymond wrote: > I am completely new to SQLite (and SQL in general), and I am currently > working on an iPhone app that uses the embedded SQLite engine to cache > offline data. What is the best way to implement synchronization capabilities > (change tracking,

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

2010-10-06 Thread Raj, Praveen
Hello, I'm new to SQLite, so not sure what is the behavior of these failed tests on Unix/Linux. Are they successfully passing all the WAL journal mode tests on Unix? What could be happening when the shared memory (-shm file) is increased from 32k to 64k? Is a new 64k memory chunk allocated

[sqlite] SQLite database sync

2010-10-06 Thread David Haymond
Hi SQLite users, I am completely new to SQLite (and SQL in general), and I am currently working on an iPhone app that uses the embedded SQLite engine to cache offline data. What is the best way to implement synchronization capabilities (change tracking, state tracking, etc.) in a separate

[sqlite] Date range based on Date in different table

2010-10-06 Thread Redhot
I would like select a date range (from/To) from a date database selection. The user enters a date (ProcessDate) in the database. ProcessDate is stored in table (tblData). I would like to get from another table (TblFund) the Rows that match the data criteria based on Date (ProcessDate)entered in

[sqlite] creating a report from four tables

2010-10-06 Thread Redhot
I'm a newbie to sqlite and programmig. I have creae a sqlite databse. I would like to ceate reports from the database. I would like to create a Report from the database that is create by more than one table from the database. Code: dim dr as new DatabaseRecord // Build the SQL

[sqlite] drop trigger - create trigger leading to malformed database

2010-10-06 Thread Ivory John
I suspect that my wrapper may be using the wrong function for drop trigger. When I drop the trigger using the command line interface, it works fine. But when I drop the trigger using my program and the DLL, I get a trigger not found error. Then when I try to create the same trigger, I get a

[sqlite] Incomplete PRAGMA index_info() documentation

2010-10-06 Thread anatoly techtonik
Hello again, PRAGMA index_info() documentation (literally): "This program returns one row row each column in the named index." http://www.sqlite.org/pragma.html#pragma_index_info This description contains typo and doesn't explain the meaning of the last row in the output. Please, CC -- anatoly

Re: [sqlite] When do I need SQLITE_THREADSAFE?

2010-10-06 Thread Dustin Sallings
On Oct 5, 2010, at 23:50, Michele Pradella wrote: > I check in the sqlite3.c code for the SQLITE_THREADSAFE. I can't found > any difference between SQLITE_THREADSAFE=1 and SQLITE_THREADSAFE=2. I > found only differences if SQLITE_THREADSAFE=0 or SQLITE_THREADSAFE>0 > Have I miss something?

Re: [sqlite] When do I need SQLITE_THREADSAFE?

2010-10-06 Thread Michele Pradella
I check in the sqlite3.c code for the SQLITE_THREADSAFE. I can't found any difference between SQLITE_THREADSAFE=1 and SQLITE_THREADSAFE=2. I found only differences if SQLITE_THREADSAFE=0 or SQLITE_THREADSAFE>0 Have I miss something? Il 06/10/2010 8.07, Michele Pradella ha scritto: >So let

Re: [sqlite] When do I need SQLITE_THREADSAFE?

2010-10-06 Thread Michele Pradella
So let me know if I understand: 1. SQLITE_THREADSAFE=0: lock are disabled at all, and you can use this if the application is not multi thread, so if there's only one thread that can use the SQLITE library 2. SQLITE_THREADSAFE=1: is the highest level of thread safety, so if