[sqlite] Use of Transaction with in memory db

2009-07-29 Thread Sharma, Gaurav
Hi All, There is one doubt in my mind regarding the use of transactions with in memory db. As it is documented on sqlite.org that transactions uses different type of file locking. But in case of in memory db there is no physical file. So my question is 1- Is there any significance of using

Re: [sqlite] Reasons for SQLITE_BUSY

2009-07-29 Thread Nikolaus Rath
"Igor Tandetnik" writes: > Nikolaus Rath wrote: >> I am accessing the same database from different threads. Each thread >> has its own connection. I have set the busy timeout for each >> connection to 5000 milliseconds. >> >> However, in some testcases I

Re: [sqlite] Subtotal SQL

2009-07-29 Thread John Machin
On 29/07/2009 11:34 PM, Adler, Eliedaat wrote: > SQL/sqlite challenge for all: It would be helpful if you made it plain whether you are asking a trick question, or are a novice with a perceived problem (and whether the management is insisting that you absolutely must have an SQL-only solution

Re: [sqlite] Lock type for SAVEPOINT

2009-07-29 Thread Igor Tandetnik
Nikolaus Rath wrote: > When there is no transaction active and I issue a SAVEPOINT command, > does that start an IMMEDIATE, EXCLUSIVE or DEFERRED transaction? http://sqlite.org/lang_savepoint.html "When a SAVEPOINT is the outer-most savepoint and it is not within a

[sqlite] Lock type for SAVEPOINT

2009-07-29 Thread Nikolaus Rath
Hello, When there is no transaction active and I issue a SAVEPOINT command, does that start an IMMEDIATE, EXCLUSIVE or DEFERRED transaction? And is there any way I can influence this? Thanks, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8

Re: [sqlite] Subtotal SQL

2009-07-29 Thread Igor Tandetnik
Adler, Eliedaat wrote: > I have a table with many columns describing objects on a disk. > >filename, date, owner, size >A12MO100 >B13 JAK90 >C10 MO80 >A13 LU 70 > > I have many different

Re: [sqlite] Reasons for SQLITE_BUSY

2009-07-29 Thread Igor Tandetnik
Nikolaus Rath wrote: > I am accessing the same database from different threads. Each thread > has its own connection. I have set the busy timeout for each > connection to 5000 milliseconds. > > However, in some testcases I still get SQLITE_BUSY errors from > sqlite3_step.

Re: [sqlite] Subtotal SQL

2009-07-29 Thread P Kishor
On Wed, Jul 29, 2009 at 8:34 AM, Adler, Eliedaat wrote: > > SQL/sqlite challenge  for all: > > > I have a table with many columns describing objects on a disk. > >    filename, date, owner, size >    A            12    MO    100 >    B            13   JAK    90 >    C            10

Re: [sqlite] Subtotal SQL

2009-07-29 Thread Swithun Crowe
Hello AE I have many different ways of ordering these objects. Usually using AE several sort parameters. I need a running sum of size that works AE regardless of what order the objects are in. I tried creating a UDF, but it seems that ordering is done after the unordered results have been

[sqlite] Porting SQLite to OS21

2009-07-29 Thread mwnn
Hi, Has anybody ported SQLite to run on OS21? If so, can u please advice me on what exactly I need to do to make SQLite work on OS21. I am using the SQLite amalgamation package to link SQLite with my application. Regards, mwnn ___ sqlite-users

Re: [sqlite] except and select

2009-07-29 Thread Pavel Ivanov
Maybe this way: select t.* from table_name t left outer join table_name t_del on t_del.operation = 'Deleted' and t_del.Filename = t.RenameTo where t.operation = 'Renamed' and t_del.ID is null union all select t.* from table_name t left outer join table_name t_ren

[sqlite] except and select

2009-07-29 Thread Gene Allen
I need to come up with a query where I can remove records that match a certain condition. I have file auditing data and I need the query to show all the files that were deleted and the files that were renamed but not the files that was deleted AND renamed TO. Problem is the Delete is one

Re: [sqlite] Subtotal SQL

2009-07-29 Thread Beau Wilkinson
I think this may involve a subquery, probably in the SELECT list itself, which uses ROWID (or ROWNUMBER... I can't remember which one is a part of the SQL standard rather than proprietary). From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Subtotal SQL

2009-07-29 Thread cmartin
On Wed, 29 Jul 2009, P Kishor wrote: For my part, I don't know how to do a running total in a result set unless I have some kind of a counter that keeps track of the "row before the current row" This is also the only way I know of. Chris On Wed, Jul 29, 2009 at 8:50 AM, Rich

Re: [sqlite] Subtotal SQL

2009-07-29 Thread P Kishor
On Wed, Jul 29, 2009 at 8:50 AM, Rich Shepard wrote: > On Wed, 29 Jul 2009, Adler, Eliedaat wrote: > >> SQL/sqlite challenge  for all: > >   No challenge for anyone who knows SQL. > >> I need a running sum of size that works regardless of what order the objects >> are

Re: [sqlite] Subtotal SQL

2009-07-29 Thread Rich Shepard
On Wed, 29 Jul 2009, Adler, Eliedaat wrote: > SQL/sqlite challenge for all: No challenge for anyone who knows SQL. > I need a running sum of size that works regardless of what order the objects > are in. > User Function/Aggregates welcome! _All_ implementations of SQL include a suite

[sqlite] Reasons for SQLITE_BUSY

2009-07-29 Thread Nikolaus Rath
Hello, I am accessing the same database from different threads. Each thread has its own connection. I have set the busy timeout for each connection to 5000 milliseconds. However, in some testcases I still get SQLITE_BUSY errors from sqlite3_step. Moreover, the whole testcases run in much less

[sqlite] Subtotal SQL

2009-07-29 Thread Adler, Eliedaat
SQL/sqlite challenge for all: I have a table with many columns describing objects on a disk. filename, date, owner, size A12MO100 B13 JAK90 C10 MO80 A13 LU 70 I have many different ways of ordering

Re: [sqlite] Question on index efficiency

2009-07-29 Thread Ibrahim A
Rael Bauer schrieb: > 1) Is the efficiency (in terms of speed) of an index equal whether field is > INT/REAL/TEXT? (Where all data is of storage type INTEGER for INT field, REAL > for REAL, TEXT for TEXT) > > I did some tests which showed that speed is equal. My real question is: > > 2) If

Re: [sqlite] How secure is encrypted sqlite database

2009-07-29 Thread John Elrick
Ram G wrote: > Hi > I have modified (credit goes to System.Data.SQLite) SQlite library to > encrypt the database. File is encrypted and data insert/update/retrieval > works fine. > > The question I have is, how secure is the encrypted database. Please correct > me if I am wrong, SQLite reads the

[sqlite] Question on index efficiency

2009-07-29 Thread Rael Bauer
1) Is the efficiency (in terms of speed) of an index equal whether field is INT/REAL/TEXT? (Where all data is of storage type INTEGER for INT field, REAL for REAL, TEXT for TEXT)   I did some tests which showed that speed is equal. My real question is:   2) If an indexed field contains records