Re: [sqlite] AS being optional

2016-08-12 Thread Dominique Devienne
On Fri, Aug 12, 2016 at 2:55 AM, Keith Medcalf wrote: > > AS is optional as it was "syntactic sugar" added to SQL [...] > AFAIK, AS is necessary in UNION, at least on some RDBMS, to have the same columns for all UNION'ed queries. So in that sense, not strictly syntax sugar.

Re: [sqlite] AS being optional

2016-08-12 Thread Keith Medcalf
> AFAIK, AS is necessary in UNION, at least on some RDBMS, to have the same > columns for all UNION'ed queries. > So in that sense, not strictly syntax sugar. And it's of course valuable > to > give good names to complex expressions. > A good name goes a long way to make "code" (of any sort) more

Re: [sqlite] AS being optional

2016-08-12 Thread Keith Medcalf
> I'm not a manager, and I do have a few "computer skills" (I think), and I > still find JOIN ON much more > readable than the FROM-comma + WHERE alternative. Helps me "thread" the > table join in my head much better. > Definitely helps me "grok" a statement faster, so not syntax sugar to me. >

Re: [sqlite] 64-bit SQLite3.exe

2016-08-12 Thread Random Coder
On Fri, Aug 12, 2016 at 10:06 AM, Rousselot, Richard A wrote: > I, and others, have tried to compile this as a 64-bit library but it will not > load from the command line (using .load) and gives the "Error: The specified > module could not be found." > >

Re: [sqlite] Can I create this view more efficient

2016-08-12 Thread Simon Slavin
On 12 Aug 2016, at 10:34pm, Cecil Westerhof wrote: > In the past I worked (I think) with a database (not SQLite) where I could > usedAfter in the definition for ratioTotalUsed. It is not a very big > problem, but is something like that possible with SQLite? Sorry, but

Re: [sqlite] Can I create this view more efficient

2016-08-12 Thread Cecil Westerhof
That is a fast reply. :-D 2016-08-12 23:48 GMT+02:00 Simon Slavin : > > On 12 Aug 2016, at 10:34pm, Cecil Westerhof > wrote: > > > In the past I worked (I think) with a database (not SQLite) where I could > > usedAfter in the definition for

Re: [sqlite] AS being optional

2016-08-12 Thread Dominique Devienne
On Fri, Aug 12, 2016 at 2:42 PM, Keith Medcalf wrote: > [...] The main problem with the JOIN/ON syntax is that to a casual reading > order is implied No idea what you mean here :) > ([...] ream of brackets [...]). > Nor what this has to do with JOIN/ON. Get off the

Re: [sqlite] AS being optional

2016-08-12 Thread Igor Korot
Dominick, On Fri, Aug 12, 2016 at 9:24 AM, Dominique Devienne wrote: > On Fri, Aug 12, 2016 at 2:42 PM, Keith Medcalf wrote: > >> [...] The main problem with the JOIN/ON syntax is that to a casual reading >> order is implied > > > No idea what you mean

Re: [sqlite] Is there a better way to perform this query?

2016-08-12 Thread Dominique Devienne
On Fri, Aug 12, 2016 at 6:01 PM, Chris Depetris wrote: >Select * FROM TABLE where ((M1 IN (0, > 1,2,7,15,150)) AND (M2 IN (0, 1,2,7,15,150) Or M2 IS NULL ) > > AND (M2 IN (0, 1,2,7,15,150) Or M2 IS NULL) AND (M3 IN (0, 1,2,7,15,150) > Or >

Re: [sqlite] 64-bit SQLite3.exe

2016-08-12 Thread Rousselot, Richard A
Update to my 64-bit saga. I was able to work with some helpful mailing list members to create a 64-bit SQLite3.exe. Far as I can tell it works fine but unfortunately I also use the math extension library (extensions-functions.c) in my CTE queries which is also 32-bit. I, and others, have

Re: [sqlite] 64-bit SQLite3.exe

2016-08-12 Thread Warren Young
On Aug 11, 2016, at 7:50 PM, Scott Robison wrote: > >> It’d be a lot of work just to avoid rebuilding for 64-bit, but maybe it >> would be an interesting project for someone. Like a master’s university >> project, maybe. >> > > At first I thought to myself that a

Re: [sqlite] 64-bit SQLite3.exe

2016-08-12 Thread Scott Robison
On Fri, Aug 12, 2016 at 12:02 PM, Warren Young wrote: > On Aug 11, 2016, at 7:50 PM, Scott Robison > wrote: > > > >> It’d be a lot of work just to avoid rebuilding for 64-bit, but maybe it > >> would be an interesting project for someone. Like a

[sqlite] page_size on ATTACH-ed databases

2016-08-12 Thread Ward WIllats
Consider: 1. Create a new database, set the pragma page_size=512 2. Create a new database on the connection with ATTACH DATABASE '/tmp/number_two.db' AS second; 3. Issue pragma second.page_size=4096 to try and set the page size on the attached DB to 4096. 4. Read back with pragma

[sqlite] Is there a better way to perform this query?

2016-08-12 Thread Chris Depetris
We have a table that has 10 fields that are used as in query as a key. The fields in question are M1-M10. M1-M10 will contain an integer of 0-5000 (may be higher). Also the values in fields M1-M10 are always unique within the record and are usually ascending (we can mandate this if it will

[sqlite] Can I create this view more efficient

2016-08-12 Thread Cecil Westerhof
At the moment I have the following table: CREATE TABLE memUsageLine( className TEXT NOT NULL, pid INT NOT NULL, timeChecked INT NOT NULL DEFAULT (strftime('%s')), freeAfter INT NOT NULL, freeBefore INT NOT NULL, maxMemory INT