Re: [sqlite] date field with default current date

2011-04-21 Thread Pavel Ivanov
>> What does "SELECT sqlite_version()" gives you in python with sqlite3 >> module? > [(u'3.5.9',)] Well, CURRENT_DATE should work then, it was added in 3.1.0. Could you show us an exact statement you are trying to execute and the exact text of error you get? Pavel On Thu, Apr 21, 2011 at 1:43

Re: [sqlite] SQLite handling of EINTR

2011-04-21 Thread Rich Rattanni
That would be it. Thanks Roger. Next time I will update first and ask questions later. -- Rich On Thu, Apr 21, 2011 at 5:55 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 04/21/2011 02:24 PM, Rich Rattanni wrote: >> The result was errno

Re: [sqlite] SQLite handling of EINTR

2011-04-21 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/21/2011 02:24 PM, Rich Rattanni wrote: > The result was errno 4, which according to > my flavor of Linux is EINTR. I suggest looking into the source 3.7.6 (more recent than your version) and find EINTR. It looks like your issue is addressed.

Re: [sqlite] Request for help with SQLite Query to return missing Date/Time Ranges

2011-04-21 Thread Pete Attkins
On 2011-04-21, at 17:13, H. Phil Duby wrote: > [...] > With possible 'adjustments' for switching to daylight savings time and > back, depending on what timezone the original data is stored in. If > it was UTC, then no problem. But if it was in you local timezone, that > used daylight savings

[sqlite] SQLite handling of EINTR

2011-04-21 Thread Rich Rattanni
I have been tracing the source of a low-occurrence anomaly in my C# application, running on Linux 2.6 under Mono. My application is using Robert Simpson's SQLite .NET adapter + SQLite 3.7.5. After I resolved my own bug, which prevented me from seeing the exception thrown by System.Data.SQLite, I

Re: [sqlite] just fyi: iPhone and iPad 3G's tracking their owners' movements and saving to sqlite db

2011-04-21 Thread Simon Slavin
On 21 Apr 2011, at 2:26pm, Pavel Ivanov wrote: > It's not related to the list but still... > >> Technically, the data referred to is as follows. An iPhone logs details of >> which phone base stations it connects to, and the 'status' data obtained >> from the base station when it was

[sqlite] Help with the code: vdbe

2011-04-21 Thread Lucas Cotta
Hi!! I'm studying databases in my college and I'd like to implement an algorithm to SQLite... since I'm not familiar with C, could you guys help me a little? For now, I just need to, every time the VDBE enters in OP_COLUMN, get the column value and put it to a string variable, that's all ! Thank

Re: [sqlite] date field with default current date

2011-04-21 Thread Fabio Spadaro
Hi. 2011/4/21 Pavel Ivanov > > Does not work on python with sqlite3 module > > What does "SELECT sqlite_version()" gives you in python with sqlite3 > module? > > > Pavel > > > On Thu, Apr 21, 2011 at 9:17 AM, Fabio Spadaro > wrote: > > Hi. > > > >

Re: [sqlite] SQLite 3.7.6 and 3.7.6.1 -- Performance issue with Triggers

2011-04-21 Thread kball...@kennethballard.com
I created the two additional indexes and ran some timing tests on the applicable tables and the timings came out much faster than anything I'd seen before, so thank you very much for your help on this.   It is very interesting that you found the query to be performing "universally slow" all the

Re: [sqlite] Problems while upgrading to 3.7.3

2011-04-21 Thread Dan Kennedy
On 04/21/2011 05:42 PM, Gaurav Srivastava wrote: > Hi > > I have recently upgraded my sqlite version from 3.5.1 to 3.7.3. With the > update I have been seeing some issues with sqlite3_prepare_v2() API. > The workflow here is: > sqlite3VdbeSetSql(pVDbe, zSql, saveSqlflag) > ^ > | >

Re: [sqlite] Request for help with SQLite Query to return missing Date/Time Ranges

2011-04-21 Thread Black, Michael (IS)
A slight mod on my solution makes it work for DST changes too. Again...rowid must be maintained. PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE log(d date); INSERT INTO "log" VALUES('2011-03-13 01:55'); INSERT INTO "log" VALUES('2011-03-13 01:56'); INSERT INTO "log"

Re: [sqlite] Request for help with SQLite Query to return missing Date/Time Ranges

2011-04-21 Thread H. Phil Duby
On Thu, Apr 21, 2011 at 12:57 AM, Oliver Peters wrote: > > Andrew Lindsay writes: > > [...] > > > I am trying to search an SQL database that is meant to have entries logged > > every minute for a period of approximately 15 months. > > > > I want to create a

Re: [sqlite] date field with default current date

2011-04-21 Thread Pavel Ivanov
> Does not work on python with sqlite3 module What does "SELECT sqlite_version()" gives you in python with sqlite3 module? Pavel On Thu, Apr 21, 2011 at 9:17 AM, Fabio Spadaro wrote: > Hi. > > 2011/4/21 Black, Michael (IS) > >> create table t

Re: [sqlite] date field with default current date

2011-04-21 Thread Fabio Spadaro
2011/4/21 Mihai Militaru > On Thu, 21 Apr 2011 15:17:00 +0200 > Fabio Spadaro wrote: > > > Does not work on python with sqlite3 module > > Try using the date and time functions, 'date' or 'datetime' in your case: > INSERT INTO table(..., date)

Re: [sqlite] How to Use an Apostrophe in a Text Field?

2011-04-21 Thread Jean-Christophe Deschamps
>True. I will get rid of the habit of using double quotes for string >literals. >Thanks for information. But most of the databases support this non >standard >behavior. Yeah ... until things break under your feet due to a new version not sticking to the "non-standard" behavior anymore or

[sqlite] Documentation error was Re: date field with default current date

2011-04-21 Thread David Garfield
http://www.sqlite.org/lang_datefunc.html This page has an error in documenting the range of values when using modifier 'unixepoch'. It says the limit is 10675199167. There should be one more digit in that to get the documented year 5352 result. --David Garfield Mihai Militaru writes: > On

Re: [sqlite] How to Use an Apostrophe in a Text Field?

2011-04-21 Thread venkat easwar
Hi, True. I will get rid of the habit of using double quotes for string literals. Thanks for information. But most of the databases support this non standard behavior. Thanks Venkat VENKAT From: Jean-Christophe Deschamps To: General

[sqlite] SQLite3 memory leaks in my c++ dll application

2011-04-21 Thread jeff archer
>From: Khanh Nguyen   >Date: Wed, 20 Apr 2011 11:00:57 -0500 > >SQLite...memory leaks... The VS debugger will stop at the specific allocation number if you add this line early on in your program execution. _crtBreakAlloc = ; Where is the allocation number reported

Re: [sqlite] date field with default current date

2011-04-21 Thread Mihai Militaru
On Thu, 21 Apr 2011 15:17:00 +0200 Fabio Spadaro wrote: > Does not work on python with sqlite3 module Try using the date and time functions, 'date' or 'datetime' in your case: INSERT INTO table(..., date) VALUES(..., datetime('now'));

Re: [sqlite] just fyi: iPhone and iPad 3G's tracking their owners' movements and saving to sqlite db

2011-04-21 Thread Pavel Ivanov
It's not related to the list but still... > Technically, the data referred to is as follows.  An iPhone logs details of > which phone base stations it connects to, and the 'status' data obtained from > the base station when it was connected.  The location (long & lat) of the > base station is

Re: [sqlite] date field with default current date

2011-04-21 Thread Fabio Spadaro
Hi. 2011/4/21 Black, Michael (IS) > create table t (d default CURRENT_DATE,i number); > insert into t (i) values(1); > select * from t; > 2011-04-21|1 > > > > Use CURRENT_TIME if you want hours/minutes too. > > > > Michael D. Black > > Senior Scientist > > NG Information

[sqlite] SHA1 codes for 3.6.21 precompiled distribution

2011-04-21 Thread Aydinoz, Baris
Hi, Could you please help me to find SHA1 codes or official download link for version 3.6.21? We want to upgrade to mentioned version, but I could not find any official download link for version 3.6.21. Therefore, I plan to verify unofficial download with SHA1 codes. Thanks in advance

[sqlite] Fastest way to insert MASSIVE data quantities

2011-04-21 Thread Phoenix
Hi, I have a database with 130 million rows. It's an RDBMS. I am thinking of using Sqlite3 as a kind of a backup, just for the important bits of data. Questions. 1. Is this advisable? Will Sqlite3 hold up to this volume? 2. What's the best way to do this -- dump from my RDBMS and then "copy"

Re: [sqlite] date field with default current date

2011-04-21 Thread Black, Michael (IS)
create table t (d default CURRENT_DATE,i number); insert into t (i) values(1); select * from t; 2011-04-21|1 Use CURRENT_TIME if you want hours/minutes too. Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate From:

Re: [sqlite] Request for help with SQLite Query to return missing Date/Time Ranges

2011-04-21 Thread Black, Michael (IS)
Assuming your database ONLY contains the log entries this should workand be pretty fast too since rowid is already indexed and there areYou no other lookups. You can add your own rowid to make this work otherwise. Just do a max(myrowid)+1 on your insert. PRAGMA foreign_keys=OFF; BEGIN

[sqlite] (no subject)

2011-04-21 Thread Patkó Last namesándor
___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Problems while upgrading to 3.7.3

2011-04-21 Thread Gaurav Srivastava
Hi I have recently upgraded my sqlite version from 3.5.1 to 3.7.3. With the update I have been seeing some issues with sqlite3_prepare_v2() API. The workflow here is: sqlite3VdbeSetSql(pVDbe, zSql, saveSqlflag) ^ | | sqlite3prepare(...) ^ | | sqlite3LockandPrepare(...)

[sqlite] date field with default current date

2011-04-21 Thread Fabio Spadaro
Hi. I'm working with python and sqlite3 and i ask how to create a table with a date field wih defaults current date. Thanks. -- Fabio Spadaro www.fabiospadaro.com ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] How to Use an Apostrophe in a Text Field?

2011-04-21 Thread Jean-Christophe Deschamps
> The apostrophes are escaped by apostrophes. Correct. http://www.sqlite.org/faq.html#q14 > One more way you can do. > >insert into () values ("*Goin' Down > >> the Road Feelin' Bad*"); > >It is double quotes before and after *. Similarly double quotes will >be escaped by one more double

Re: [sqlite] How to Use an Apostrophe in a Text Field?

2011-04-21 Thread Alan Holbrook
Sorry if my reply didn't make it through the first time, but doubling up on the apostrophes worked just fine. My thanks to those of you who suggested it. On Thu, Apr 21, 2011 at 4:27 AM, venkat easwar wrote: > > > The apostrophes are escaped by apostrophes. One more way

Re: [sqlite] How to Use an Apostrophe in a Text Field?

2011-04-21 Thread venkat easwar
The apostrophes are escaped by apostrophes. One more way you can do. insert into () values ("*Goin' Down >> the Road Feelin' Bad*"); It is double quotes before and after *. Similarly double quotes will be escaped by one more double quote VENKAT From: Jim

Re: [sqlite] Security issues with SQLite3.6.23.1

2011-04-21 Thread thilo
On 4/21/2011 3:59 AM, Roger Binns wrote: > On 04/20/2011 06:54 AM, thilo wrote: > > They are a great tool ensuring programs have fewer memory leaks, thread > > issues and the like and if one has access to their results, please USE > > it and judge the false positives with human eyes - strcpy &

Re: [sqlite] Request for help with SQLite Query to return missing Date/Time Ranges

2011-04-21 Thread Oliver Peters
Andrew Lindsay writes: [...] > I am trying to search an SQL database that is meant to have entries logged > every minute for a period of approximately 15 months. > > I want to create a query that will search through the database and tell me > for which periods I do not have