Re: [sqlite] Select with dates

2013-09-17 Thread Niall O'Reilly
On 16 Sep 2013, at 18:43, Petite Abeille wrote: > What about simply using not overlapping intervals and call it a day? Sure! WFM. I thought that was what I was suggesting. 8-) /Niall ___ sqlite-users mailing list sqlite-users@sqlit

Re: [sqlite] Select with dates

2013-09-16 Thread Petite Abeille
On Sep 16, 2013, at 10:48 AM, Niall O'Reilly wrote: > Consecutive closed intervals overlap. Depending on the > application, this may be a problem; it can be avoided by > using half-open ones. What about simply using not overlapping intervals and call it a day? __

Re: [sqlite] Select with dates

2013-09-16 Thread Simon Slavin
On 16 Sep 2013, at 9:48am, Niall O'Reilly wrote: > On 14 Sep 2013, at 18:09, Petite Abeille wrote: > >> Yeah... not sure why people are doing that to themselves though :D > > Consecutive closed intervals overlap. Depending on the > application, this may be a problem; it can be avo

Re: [sqlite] Select with dates

2013-09-16 Thread Niall O'Reilly
On 14 Sep 2013, at 18:09, Petite Abeille wrote: > Yeah... not sure why people are doing that to themselves though :D Consecutive closed intervals overlap. Depending on the application, this may be a problem; it can be avoided by using half-open ones. /N __

Re: [sqlite] Select with dates

2013-09-14 Thread Petite Abeille
On Sep 14, 2013, at 4:24 AM, James K. Lowden wrote: >> Why not >>SELECT * FROM "entry" WHERE >> bankdate >= date('now','start of month') >> AND bankdate < date('now','start of month','+1 month') > > The half-open interval strikes again! :-) Yeah... not sure why people a

Re: [sqlite] Select with dates

2013-09-13 Thread Keith Medcalf
> On Thu, 12 Sep 2013 14:01:04 +0100 > Simon Davies wrote: > > > Why not > > SELECT * FROM "entry" WHERE > >bankdate >= date('now','start of month') > > AND bankdate < date('now','start of month','+1 month') > > The half-open interval strikes again! :-) And you are us

Re: [sqlite] Select with dates

2013-09-13 Thread James K. Lowden
On Thu, 12 Sep 2013 14:01:04 +0100 Simon Davies wrote: > Why not > SELECT * FROM "entry" WHERE >bankdate >= date('now','start of month') > AND bankdate < date('now','start of month','+1 month') The half-open interval strikes again! :-) --jkl __

Re: [sqlite] Select with dates

2013-09-12 Thread jwzumwalt
Thank! This worked great! -- View this message in context: http://sqlite.1065341.n5.nabble.com/Select-with-dates-tp71222p71229.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://s

Re: [sqlite] Select with dates

2013-09-12 Thread Keith Medcalf
('now', 'localtime', 'start of month', '+1 month', '-1 second')); which will force the VDBE compiler to emit once conditionals around the date functions since it is clear that they represent a scalar constant. The join format is somewhat more useful if you will be re

Re: [sqlite] Select with dates

2013-09-12 Thread Hick Gunter
rüngliche Nachricht- Von: Simon Davies [mailto:simon.james.dav...@gmail.com] Gesendet: Donnerstag, 12. September 2013 15:01 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Select with dates On 12 September 2013 06:34, jwzumwalt wrote: > I have not used the date function in sel

Re: [sqlite] Select with dates

2013-09-12 Thread Simon Davies
On 12 September 2013 06:34, jwzumwalt wrote: > I have not used the date function in select statements before. > I have valid entries for the current month, what am I doing wrong? > > SELECT * FROM "entry" WHERE > bankdate > date('now','end of month','-1 month') > AND bankda

[sqlite] Select with dates

2013-09-12 Thread jwzumwalt
I have not used the date function in select statements before. I have valid entries for the current month, what am I doing wrong? SELECT * FROM "entry" WHERE bankdate > date('now','end of month','-1 month') AND bankdate < date('now','start of month','+1 month') -- View