Hi Simon, Sorry, maybe we're crossing wires, but I'm not sure to what you're referring. How is defining the type as DATE impeding my attempt to get a value of 0 for non-existent rows? Ryan's response with a CTE seems to probably be what I want (not had the opportunity to test it yet - CTE's are entirely new to me), but looking at it quickly now I see that the type is actually NUMERIC there rather than my DATE - perhaps that's to what you're referring.
Cheers, Jonathan ---- On Thu, 12 May 2016 18:29:47 +0100 Simon Slavin<slavins at bigfraud.org> wrote ---- On 12 May 2016, at 3:55pm, Jonathan Moules <jonathan-lists at lightpear.com> wrote: > I know that the "DATE" type isn't actually a type in SQLite and that there are no date-specific constraints, but I find it a convenient indicator (to me and potentially anyone else who's going to see the code) as to the type of data that is to be held in that column. I figured that's why those "type" synonyms exist (I use DATETIME as well!) What you don't mention there is that defining that column as DATE is what's causing the weird-looking results you asked about. Simon. _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users