Re: [sqlite] MONTH function

2013-06-23 Thread Gabor Grothendieck
Or even: "select cast(strftime('%m') as integer)=6" On Sun, Jun 23, 2013 at 4:16 PM, Gabor Grothendieck wrote: > Which can also be written as: > > "select cast(strftime('%m','now') as integer)=6" > > On Sun, Jun 23, 2013 at 4:11 PM, Patrik Nilsson >

Re: [sqlite] MONTH function

2013-06-23 Thread Gabor Grothendieck
Which can also be written as: "select cast(strftime('%m','now') as integer)=6" On Sun, Jun 23, 2013 at 4:11 PM, Patrik Nilsson wrote: > You can write: > > "select cast(strftime('%m',datetime('now')) as integer)=6" > 1 > > > On 06/23/2013 09:45 PM, Lucas wrote: >>

Re: [sqlite] MONTH function

2013-06-23 Thread Patrik Nilsson
You can write: "select cast(strftime('%m',datetime('now')) as integer)=6" 1 On 06/23/2013 09:45 PM, Lucas wrote: > Hello, > > I am testing SQLIte as we are considering to change our DB Server but I > found that a feature is missing, the function Month: > > SELECT SUM( NINGRESO ) AS ndev FROM

Re: [sqlite] MONTH function

2013-06-23 Thread Patrik Nilsson
"select strftime('%m',datetime('now'))='06'" 1 "select strftime('%m',datetime('now'))=6" 0 It is considered as a string, not a number. On 06/23/2013 09:45 PM, Lucas wrote: > Hello, > > I am testing SQLIte as we are considering to change our DB Server but I > found that a feature is missing,

Re: [sqlite] VACUUM and PRAGMA temp_store

2013-06-23 Thread Richard Hipp
On Sun, Jun 23, 2013 at 5:06 AM, Mario M. Westphal wrote: > > When creating/opening a file in Windows, an application can mark this file > as "temporary" (flag: FILE_ATTRIBUTE_TEMPORARY) and Windows will try to > keep > it in memory if sufficient memory is available, avoiding all

Re: [sqlite] MONTH function

2013-06-23 Thread Simon Slavin
On 23 Jun 2013, at 8:45pm, Lucas wrote: > Also, the function strftime('%m', fecha) does not solve the issue: > > SELECT SUM( NINGRESO ) AS ndev FROM APUNTES WHERE strftime('%m', fecha) = 1 We want to know what format you are storing your dates in. Can you do this:

[sqlite] MONTH function

2013-06-23 Thread Lucas
Hello, I am testing SQLIte as we are considering to change our DB Server but I found that a feature is missing, the function Month: SELECT SUM( NINGRESO ) AS ndev FROM APUNTES WHERE MONTH(FECHA) = 1 This works perfect under MySQL or MSSQL. Do you plan to introduce MONTH and YEAR functions?.

[sqlite] Multiple connections in same process out of sync

2013-06-23 Thread Yuriy Stelmakh
Hi all, I'm having an issue when using multiple connections inside same process. Shared -mode is off in my case because b-tree locking slowed down performance when shared cache was on. The issue i'm having is that when one connection performs an insert, sometimes the other connection's page cache

[sqlite] Converting my sqlite database to utf-8

2013-06-23 Thread user
Hello, I want to link my database to android and I am writing arabic words in it so I need to convert these words to utf-8 or else I won't be able to select them from android I am gonna get question marks so how to do that if I have already written the data but it's written in ansi how to

Re: [sqlite] How to interrupt a long running update without roll back?

2013-06-23 Thread RSmith
Bit long ago to recall exactly, but to be honest I think it was quite more sinister even, if memory serves, I was modifying the rowids too. Either way I avoid messing with rowids or relying on them altogether now as a short-cut to updating - but it s quite safe to do so. As an aside, while

Re: [sqlite] unique id for table

2013-06-23 Thread e-mail mgbg25171
Yes thanks for the advice...I've already combined the "raw" data i.e. vectors straight out of the annual reports and the calculated vectors e.g.. "noplat" derived from it which I've given a type "calcd" in the type field of the same table "itms". There is some market wide data however, which might

Re: [sqlite] How to interrupt a long running update without roll back?

2013-06-23 Thread Donald Griggs
Regarding: ...then went horribly wrong at some point after rowids consumed all of 32 bits... If your application treated ROWIDs as 32-bit integers, that may possibly have been the cause of your problem, since ROWID's are 64-bit integers. The maximum ROWID is 9223372036854775807

Re: [sqlite] unique id for table

2013-06-23 Thread Simon Slavin
On 23 Jun 2013, at 12:26pm, e-mail mgbg25171 wrote: > The "table as a number" idea is necessary to fit my model > where word definitions are stored as streams of code pointers (NUMBERS) > that just get called. > i.e. EVERYTHING has to be a number That makes perfect

Re: [sqlite] unique id for table

2013-06-23 Thread e-mail mgbg25171
I'm writing a variation of forth (It's got an IDE and 3-level stepping debugger already) that's actually a company valuation programming language (Can't get on with spreadsheets hiding everything) It accomodates words that are financial report line items (vectors) and their manipulation and I'm

Re: [sqlite] How to interrupt a long running update without roll back?

2013-06-23 Thread RSmith
On 2013/06/23 00:15, Simon Slavin wrote: //... UPDATE myTable SET C1 = [calculation] WHERE rowid > [lastupdatedrowid] then update the updateprogress table. Since there is no searching needed, there’s no need for scanning the table, and no need for any indexes. Simon. One caution on this

[sqlite] VACUUM and PRAGMA temp_store

2013-06-23 Thread Mario M. Westphal
Hello List the SQLite databases I use on Windows can become fairly large (several GB). I just noticed that running a VACCUM on such a large database (where several of the tables are also real large) can cause excessive memory usage (more than 2.5 GB RAM in peak). I tracked this down to using

Re: [sqlite] unique id for table

2013-06-23 Thread RSmith
There is of course no straight-forward way to do this, as I've noted Simon said already. But my curiosity is very piqued - Mind sharing what kind of application requires number-only calling? You using this on a calculator of sorts? - If so (or otherwise), some details would be interesting to