Re: [SQL] question using 'between' in a sql query

2005-12-04 Thread Theodore Petrosky
thanks... as is so often the case I discovered date_trunc('day', insertdate) between '11/20/2005' AND '11/20/2005' also works It wasn't until I pressed the send button that I thought of the solution. I have thought of creating a faux 'send' button for my email software... yours is a little e

Re: [SQL] question using 'between' in a sql query

2005-12-03 Thread Michael Fuhr
On Sat, Dec 03, 2005 at 09:54:16AM -0800, Theodore Petrosky wrote: > if 'between' is inclusive of the start and end dates why doesn't > this query result in all the rows on '11/20/2005'? EXPLAIN shows what happens when you compare a date against a timestamp: Filter: ((insertdate >= '2005-11-20 00

[SQL] question using 'between' in a sql query

2005-12-03 Thread Theodore Petrosky
My table create table mytable ( employeecode text, info text, somestuff text, insertdate timestamp with time zone); I have an interface where the user can query for all employeecode between two dates. I assumed from the docs that: SELECT employeecode FROM mytable WHERE insertdate BETWEEN '11/20/