Re: [sqlite] datetime as integer

2009-03-13 Thread John Machin
On 12/03/2009 12:21 AM, Nicolás Solá wrote: > Hi I’m using Trac software and it is implemented using SQLITE3. In Trac DB > schema there is a table called “milestone”. It has a field called “due” and > it means due date. The problem is that it uses an integer data type to store > the datum and I

Re: [sqlite] Fossil

2009-03-13 Thread D. Richard Hipp
On Mar 12, 2009, at 5:43 PM, John Elrick wrote: > I just joined the Fossil newsgroup and posted two messages; one a > documentation defect and the second a question. I don't know how much > it's being monitored, so I wanted to give those concerned a heads up. I have had a total of about 8

Re: [sqlite] how to divide a database?

2009-03-13 Thread baxy77bax
ok, and how to construct a query that says; select data from table until row number = 'middle point or so...'. or generally how to say; select 30 rows then transfer it into new table , then select next 30 rows and do the same... and so on until you reach the end iteration is not such a

Re: [sqlite] datetime as integer

2009-03-13 Thread Simon Davies
2009/3/13 John Machin : > On 12/03/2009 12:21 AM, Nicolás Solá wrote: >> Hi I’m using Trac software and it is implemented using SQLITE3. In Trac DB >> schema there is a table called “milestone”. It has a field called “due” and >> it means due date. The problem is that it uses

[sqlite] SQLite Database Corruption

2009-03-13 Thread Chaitali
I am using SQLite database on Windows XP Professional as a back-end for my application in VB6. Generally SQLite is functioning satisfactorily except for a few instances when the database is getting corrupted. In one such case of corruption the data from two tables got intermingled. In another case

[sqlite] Advices to get max performance with SQLITE and BLOBS

2009-03-13 Thread Pierre Chatelier
Hello, I am using SQLITE to store and retrieve raw data blocks that are basically ~300Ko. Each block has an int identifier, so that insert/ select are easy. This is a very basic use : I do not use complex queries. Only "INSERT/SELECT where index=..." Now, I am thinking about performance,

Re: [sqlite] SQLite Database Corruption

2009-03-13 Thread Kees Nuyt
On Fri, 13 Mar 2009 14:17:12 +0530, "Chaitali" wrote: >I am using SQLite database on Windows XP Professional as a back-end for my >application in VB6. Generally SQLite is functioning satisfactorily except >for a few instances when the database is getting

Re: [sqlite] How to interrupt a running query in SQLite?

2009-03-13 Thread manohar s
Thanks for that. I Should have searched that :). Now I am Executing the Vacuum query, and sqlite3_interrupt() is called from a different thread, It is interrupted. But once interrupted query execution is failing with SQLITE_ERROR. It has to fail with SQLITE_INTERRUPT right? sqlite3_errmsg() is

Re: [sqlite] How to interrupt a running query in SQLite?

2009-03-13 Thread Simon Davies
2009/3/13 manohar s : > Thanks for that. I Should have searched that :). > > Now I am Executing  the Vacuum query, and sqlite3_interrupt() is called from > a different thread, It is interrupted. > But once interrupted query execution is failing with SQLITE_ERROR. It has to >

Re: [sqlite] How to interrupt a running query in SQLite?

2009-03-13 Thread manohar s
No, I am using sqlite3_prepare(). Regards, Manohar.S On Fri, Mar 13, 2009 at 4:23 PM, Simon Davies < simon.james.dav...@googlemail.com> wrote: > 2009/3/13 manohar s : > > Thanks for that. I Should have searched that :). > > > > Now I am Executing the Vacuum query, and

Re: [sqlite] How to interrupt a running query in SQLite?

2009-03-13 Thread Dan
On Mar 13, 2009, at 5:41 PM, manohar s wrote: > Thanks for that. I Should have searched that :). > > Now I am Executing the Vacuum query, and sqlite3_interrupt() is > called from > a different thread, It is interrupted. > But once interrupted query execution is failing with SQLITE_ERROR. >

Re: [sqlite] How to interrupt a running query in SQLite?

2009-03-13 Thread manohar s
sqlite3_errcode() was not used, I was just checking the return code of sqlite3_step(), I read about the problem with sqlite3_step(), I will think about using sqlite3_prepare_v2(). It is returning with SQLITE_INTERRUPT if I use sqlite3_errcode(). Thanks for replying, Manohar On Fri, Mar 13, 2009

[sqlite] Merging two SQLites + leaving out duplicates?

2009-03-13 Thread Gilles Ganault
Hello I have two SQLites databases that I need to merge. Some companies are found in both, so I'd like to only keep one record when this occurs. What would be the right way to do this? Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] WHERE clause doesn't seem to work right

2009-03-13 Thread John Elrick
Fitter Man wrote: > I've just started using Sqlite and something seems wrong. I'm sure I'm making > a mistake, but can't spot it. > > I have a process that loads data from an RSS feed into a database. All the > columns are defined as VARCHAR(255) but I figure that's irrelevant here > based on

Re: [sqlite] WHERE clause doesn't seem to work right

2009-03-13 Thread Fitter Man
I tried something for kicks and it worked. I flipped all the column definitions from VARCHAR(255) to INTEGER and my query, above, works properly. I did a little reading and found this described my problem: http://www.sqlite.org/datatypes.html . Q: Is their some inverse problem now that all the

Re: [sqlite] Merging two SQLites + leaving out duplicates?

2009-03-13 Thread P Kishor
On Fri, Mar 13, 2009 at 9:14 AM, Gilles Ganault wrote: > On Fri, 13 Mar 2009 09:52:25 -0400, "Igor Tandetnik" > wrote: > (snip) > > Thank you Igor for the help. Before I give it a shot, I need to speciy > those requirements: > 1. The tables live in

Re: [sqlite] WHERE clause doesn't seem to work right

2009-03-13 Thread John Elrick
Fitter Man wrote: > I tried something for kicks and it worked. I flipped all the column > definitions from VARCHAR(255) to INTEGER and my query, above, works > properly. I did a little reading and found this described my problem: > http://www.sqlite.org/datatypes.html . > > > Q: Is their some

Re: [sqlite] WHERE clause doesn't seem to work right

2009-03-13 Thread Fitter Man
@John: Is that documented anywhere? I ask because there are some cases I'd like to understand better without going through a lot of testing to determine how it works. I'm inferring from your example the rule is all numerics come first, with integer and floats interleaved according to their

Re: [sqlite] WHERE clause doesn't seem to work right

2009-03-13 Thread Wilson, Ron P
See section 3.0 http://www.sqlite.org/datatypes.html Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453 -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Fitter Man Sent: Friday, March 13, 2009 11:10 AM To:

Re: [sqlite] Merging two SQLites + leaving out duplicates?

2009-03-13 Thread Igor Tandetnik
"Gilles Ganault" wrote in message news:bcqkr45c944gv4g1h9ovpjq1ood1i1v...@4ax.com > On Fri, 13 Mar 2009 09:52:25 -0400, "Igor Tandetnik" > wrote: > Thank you Igor for the help. Before I give it a shot, I need to speciy > those requirements: > 1. The

Re: [sqlite] WHERE clause doesn't seem to work right

2009-03-13 Thread Dan
On Mar 13, 2009, at 10:10 PM, Fitter Man wrote: > > @John: Is that documented anywhere? I ask because there are some > cases I'd > like to understand better without going through a lot of testing to > determine how it works. I'm inferring from your example the rule is > all > numerics come

Re: [sqlite] how to divide a database?

2009-03-13 Thread Ken
on lower half.. attach database 'yourdbname' as full; insert into table1 select * from full.table1 where col1 < 'your mid point value'; on upper half attach database 'yourdbname' as full; insert into table1 select * from full.table1 where col1 >= 'your mid point value'; You'll need a

Re: [sqlite] Advices to get max performance with SQLITE and BLOBS

2009-03-13 Thread Ken
Pierre, Have you considered storing the blob data into a file? Just keep a record of the blob in the sqlite.db if you store all the blobs in a single file then you'll need a filename, begin, length. Or if one blob per file just the filename.. Just an idea. Not really sure which would be

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-13 Thread Olaf Schmidt
"Jean-Christophe Deschamps" schrieb im Newsbeitrag news:7.0.1.0.2.20090312013713.0262b...@q-e-d.org... > Perhaps the best way is practice: what's the way to find > this guy named Éric or is it éric, or Eric, or eric? > He lives in MÜNCHEN, München, MUNCHEN, > Munchen or ...

[sqlite] Upgrade from 3.5.9 to 3.6.11

2009-03-13 Thread Joanne Pham
Hi All, We have a application using SQLite 3.5.9 now and we will be releasing this product in June.  I am think about upgrading SQLite from 3.5.9 to SQLite 3.6.11 but I don't know what are the impact for the application and is it worth to upgrade SQLite to newest one before the product is

Re: [sqlite] Merging two SQLites + leaving out duplicates?

2009-03-13 Thread Adam DeVita
Good day, I'd like to tack on an additional question, since it is a common case applied to the goal of this thread. Suppose you have a field that time stamps the date each company's data was entered. Unfortunately some records in old2.db have newer contact information, while others are older

Re: [sqlite] Merging two SQLites + leaving out duplicates?

2009-03-13 Thread Igor Tandetnik
"Adam DeVita" wrote in message news:804081910903130900r6c615f02u2b72ba810cccf...@mail.gmail.com > Suppose you have a field that time stamps the date each company's data > was entered. > > Unfortunately some records in old2.db have newer contact information, > while others

Re: [sqlite] datetime as integer

2009-03-13 Thread Fazoogled
You could just try this and see what happens: char *ctime(const time_t *timer); The returned string is in the following format: DDD MMM dd hh:mm:ss You may just be surprised or not! Michael -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Query Doesn't Find Record

2009-03-13 Thread jonwood
P Kishor-3 wrote: > > why don't you try it? See below -- > What are you folks using to type these queries? I've yet to find any good utilities that do this for the Windows platform. Thanks. Jonathan -- View this message in context:

Re: [sqlite] Upgrade from 3.5.9 to 3.6.11

2009-03-13 Thread Kees Nuyt
On Fri, 13 Mar 2009 08:57:35 -0700 (PDT), Joanne Pham wrote: > Hi All, > We have a application using SQLite 3.5.9 now > and we will be releasing this product in June. > I am think about upgrading SQLite from 3.5.9 to > SQLite 3.6.11 but I don't know what are the > impact

Re: [sqlite] datetime as integer

2009-03-13 Thread Timothy A. Sawyer
I stand corrected on the math Bottom line is that different applications use different baseline values for epoch (beginning of time) and you must know that baseline value --Original Message-- From: Kees Nuyt Sender: sqlite-users-boun...@sqlite.org To: sqlite-users@sqlite.org ReplyTo:

Re: [sqlite] Upgrade from 3.5.9 to 3.6.11

2009-03-13 Thread D. Richard Hipp
On Mar 13, 2009, at 9:22 PM, Kees Nuyt wrote: > On Fri, 13 Mar 2009 08:57:35 -0700 (PDT), Joanne Pham > wrote: > >> Hi All, >> We have a application using SQLite 3.5.9 now >> and we will be releasing this product in June. >> I am think about upgrading SQLite from 3.5.9

Re: [sqlite] Query Doesn't Find Record

2009-03-13 Thread Kees Nuyt
On Fri, 13 Mar 2009 12:42:46 -0700 (PDT), jonwood wrote: > > >P Kishor-3 wrote: >> >> why don't you try it? See below -- >> > >What are you folks using to type these queries? I've yet to find any good >utilities that do this for the Windows platform. sqlite3.exe in a

Re: [sqlite] Query Doesn't Find Record

2009-03-13 Thread jonwood
Kees Nuyt wrote: > >>What are you folks using to type these queries? I've yet to find any good >>utilities that do this for the Windows platform. > > sqlite3.exe in a CMD window. > > And SQLiteSPy for browsing databases. > Thanks! Jonathan -- View this message in context:

[sqlite] Compiling 3.6.11 on Solaris results in runtime segmentation fault

2009-03-13 Thread David Jones
I am compiling 3.6.11 from amalgamated sources on Solaris and I get a Segmentation Fault whenever I type something at the shell. Pasted below are some information which might be helpful. Does anyone else see this error or have a workaround? I get the same behavior when I run in gdb or just from

[sqlite] Problem with table refactoring

2009-03-13 Thread Rand Huck
I am refactoring a table for an Adobe AIR application a little bit and am calling the following statements: CREATE TEMPORARY TABLE `tbl_backup` ( `id` integer, `title`varchar(255), `body`text, `status`varchar(16) ); INSERT

Re: [sqlite] Problem with table refactoring

2009-03-13 Thread Rand Huck
Sorry, that was the result of my genericizing the code. The code I have does not have the trailing comma. On Fri, Mar 13, 2009 at 9:03 PM, Igor Tandetnik wrote: > "Rand Huck" wrote in > message >

Re: [sqlite] Problem with table refactoring

2009-03-13 Thread Rand Huck
I just found the problem. I was executing this from a file, but was splitting the file by the ';' delimiter and executing it accordingly. Of course, that produces an array whose last element is an empty string. I tacked on a ';' at the end of that, producing this error. Carry on. :P I need a

Re: [sqlite] Problem with table refactoring

2009-03-13 Thread Igor Tandetnik
"Rand Huck" wrote in message news:d232e14b0903131809x74e4f0cdn9264d4a4e...@mail.gmail.com > Sorry, that was the result of my genericizing the code. The code I > have does > not have the trailing comma. So, does the code that you show exhibit the problem you are asking