"John Velman" <velman@cox.net> writes:
> When I do a select such as
> SELECT * FROM table WHERE date BETWEEN '2001-12-28' AND '2002-01-28'
> It misses the entry with date '2002-01-28' (which does exist!).
Uh, what exactly is the datatype of the "date" column?
> The only way I've been able to handle this, so far, is
> in this fashion:
> SELECT * FROM table WHERE
> date BETWEEN 20011228 - .001 AND 20020128 + .001 ;
I think the odds that this does what you think it does are vanishingly
small :-(. There's no date-vs-numeric comparison operator. It's
probably getting interpreted as some bizarre textual comparison.
regards, tom lane