[sqlite] Converting date from d/m/yy format

2007-11-01 Thread T
Hi all, How can I convert dates from the format d/m/yy to SQL style YYY-MM-DD? I have some imported data that includes a date column in the format d/ m/yy, where: d = day as 1 or two digits m = month as 1 or two digits yy = year as two digits eg: 2/11/07 = today 2/8/68 = 2nd of August,

Re: [sqlite] lock counting?

2007-11-01 Thread Richard Klein
Dan Kennedy wrote: From SQLite's point of view, locks are on a per file-handle basis. If a unix process that uses sqlite has two file-handles open on the same file (i.e. because the user has opened two separate connections with two calls to sqlite3_open()), SQLite expects them to be able to

Re: [sqlite] lock counting?

2007-11-01 Thread Richard Klein
Joe Wilson wrote: --- Richard Klein <[EMAIL PROTECTED]> wrote: In implementing xLock in a VFS, do we need to worry about lock counts, i.e. nested locking? In other words, if a process asks for, say, a SHARED lock, and he already has one, should we increment a SHARED lock count? Or is it okay

Re: [sqlite] lock counting?

2007-11-01 Thread Richard Klein
Dan Kennedy wrote: On 11/1/07, Richard Klein <[EMAIL PROTECTED]> wrote: In implementing xLock in a VFS, do we need to worry about lock counts, i.e. nested locking? No. You don't need to worry about that. In other words, if a process asks for, say, a SHARED lock, and he already has one,

Re: [sqlite] How many virtual table implemenations are there out there?

2007-11-01 Thread Joe Wilson
I agree. How about "Synthetic Table" or "Abstract Table"? --- Darren Duncan <[EMAIL PROTECTED]> wrote: > While you're at it, I strongly recommend changing the feature name > from "virtual table" to "federated table", or at least not something > called "virtual", because the older/current name

Re: [sqlite] How many virtual table implemenations are there out there?

2007-11-01 Thread Darren Duncan
At 9:03 AM -0400 11/1/07, D. Richard Hipp wrote: The current virtual-table implementation does not work when you have shared cache mode enabled. We would like to fix this so that that you can (for example) use FTS and shared cache at the same time. But to do so seems likely to require an

Re: [sqlite] How many virtual table implemenations are there out there?

2007-11-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 D. Richard Hipp wrote: > The current virtual-table implementation does not work when you have > shared cache mode enabled. Can you also fix the xFindFunction api? The problem with it is that I have no idea when SQLite is finished with the function

[sqlite] INSERT into virtual table - missing value versus explicit NULL

2007-11-01 Thread Evans, Mark (Tandem)
Hi all, It's nit-picking time... I'm writing a virtual table module and ran into a little gotcha. The INSERT syntax allows one to specify NULL as a column value or to omit a column name. Compare: insert into T(a,c) values (1,2) take default value for column B if any versus

Re: [sqlite] How many virtual table implemenations are there out there?

2007-11-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 D. Richard Hipp wrote: > If you have or know of a virtual table implementation (other than the ones > that are included with SQLite - such as FTS1-3) that will be broken by an > API change, please let me know. And please also advice me how much of >

Re: [sqlite] Problem using POSIX semaphores and triggers to signal updates

2007-11-01 Thread Bill Gatliff
John Stanton wrote: Bill, You have an interesting situation, and a general one since you have data distributed across a network. I would be tempted to define a remote procedure call using TCP/IP or whatever and use that to notify database changes. Use a message passing approach. The

[sqlite] how to efficiently transform a table?

2007-11-01 Thread zvr
[disclaimer: I haven't touched SQL since my academic years...] I am troubled by a problem concerning efficiency; I'll present a simplified case. I have a catalog of people, with their parents' (first) names: create table cat (id integer, last text, first text, dad text, mom text); I'd like to

RE: [sqlite] DB managers that do searches?

2007-11-01 Thread James Dennett
> -Original Message- > From: Bernie Cosell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 31, 2007 12:20 PM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] DB managers that do searches? > > On 31 Oct 2007 at 11:37, James Dennett wrote: > > > Bernie Cosell wrote: > > > > I

[sqlite] Another query optimization question

2007-11-01 Thread Matthew Gertner
The following query: SELECT DISTINCT _Resource.ResourceType, _Resource.Id, _Resource.OwnerId, _Resource.Created, _Resource.Modified, _Resource.Name, _Resource.ParentId, _Resource.Version, _Resource.Description, _Resource.Creator, _File.Size, _File.MimeType, _File.OriginURI, _File.OriginMimeType,

Re: [sqlite] Problem using POSIX semaphores and triggers to signal updates

2007-11-01 Thread John Stanton
Bill, You have an interesting situation, and a general one since you have data distributed across a network. I would be tempted to define a remote procedure call using TCP/IP or whatever and use that to notify database changes. Use a message passing approach. BTW, in a new system you

Re: [sqlite] Strange error in sqlite 3.4.2 Win32 version

2007-11-01 Thread Joe Wilson
--- Marco Bambini <[EMAIL PROTECTED]> wrote: > Here it is the output of explain SELECT a FROM One WHERE b1 = 99 AND > b2 = 100 and b3 = 101; > > 0|Goto|0|20||1| > Integer|0|0||2| > OpenRead|1|4|keyinfo(3,BINARY,BINARY)|3| > SetNumColumns|1|4||4| > Integer|99|0||5| > IsNull|-1|18||6| >

Re: [sqlite] Problem using POSIX semaphores and triggers to signal updates

2007-11-01 Thread Bill Gatliff
John Stanton wrote: Perhaps your application sjould post its signal after the COMMIT has executed. A pause to give time for the COMMIT is a fragile approach. It is indeed! And just for the record, it's an approach that deserves absolutely no consideration by any system you want to depend

Re: [sqlite] Problem using POSIX semaphores and triggers to signal updates

2007-11-01 Thread Dennis Cote
Bill Gatliff wrote: The problem I'm seeing is that the GUI process is getting stale data in its SELECT, unless it does a brief sleep between the sem_wait() and the sqlite3_exec(). Specifically, the value returned is the value immediately before the UPDATE. It's as if the trigger in the

[sqlite] Master Journal files hanging around

2007-11-01 Thread Doug
I've asked before about -mj. files that are left after using SQLite on a Windows machine. In every instance where this has happened, it has been caused by some third party app (often virus scanners) that grab hold of the file and cause the delete to fail. But now I have a case where there is no

Re: [sqlite] How many virtual table implemenations are there out there?

2007-11-01 Thread John Stanton
To make virtual tables compatible with shared cache would be a convenience for us, and not in the least inconvenient. D. Richard Hipp wrote: The current virtual-table implementation does not work when you have shared cache mode enabled. We would like to fix this so that that you can (for

Re: [sqlite] Problem using POSIX semaphores and triggers to signal updates

2007-11-01 Thread John Stanton
Bill Gatliff wrote: Guys: I'm a relatively-new SQLite user, but I'm luuuvin' it! :) My application is a mobile platform with a GUI that wants to display frequently-updated data in a database. The GUI is a separate process from the one providing the data, and is one of several consumers

Re: [sqlite] How many virtual table implemenations are there out there?

2007-11-01 Thread Andrew McDermott
Hello, > The current virtual-table implementation does not work when you have > shared cache mode enabled. We would like to fix this so that that > you can (for example) use FTS and shared cache at the same time. > But to do so seems likely to require an incompatible change to the >

[sqlite] How many virtual table implemenations are there out there?

2007-11-01 Thread D. Richard Hipp
The current virtual-table implementation does not work when you have shared cache mode enabled. We would like to fix this so that that you can (for example) use FTS and shared cache at the same time. But to do so seems likely to require an incompatible change to the virtual-table

[sqlite] Lock and Unlock mechanism

2007-11-01 Thread Sreedhar.a
Hi, I am working with OS which does not has the support of Lockfile and Unlockfile functions. How I can I implement the Sqlite using the File I/O method. Thanks in advance, Your suggestions will help a lot in my project. Best Regards, A.Sreedhar. Jasmin Infotech Pvt. Ltd. Plot 119,

Re: [sqlite] Strange error in sqlite 3.4.2 Win32 version

2007-11-01 Thread Marco Bambini
Yes sure Joe, I just needed some more time. Here it is the output of explain SELECT a FROM One WHERE b1 = 99 AND b2 = 100 and b3 = 101; 0|Goto|0|20||1| Integer|0|0||2| OpenRead|1|4|keyinfo(3,BINARY,BINARY)|3| SetNumColumns|1|4||4| Integer|99|0||5| IsNull|-1|18||6| Integer|100|0||7|

Re: [sqlite] lock counting?

2007-11-01 Thread Dan Kennedy
On Wed, 2007-10-31 at 22:27 -0700, Joe Wilson wrote: > After reading Dan's response, I must be mis-interpreting these comments. I was a bit terse. See below. > > > > See comments for unixLock() and unixUnlock() in os_unix.c. > > > > /* > > ** An instance of the following structure is allocated