On Sun, Jan 14, 2001 at 04:46:08AM +0100, Alvar Freude wrote:
> Peter Eisentraut schrieb:
> >
> > > today i was trying to perform a query on a database using a time stamp
> > > field, i need to get all records which belong to year 2000, month 11,
> [...]
> > select user_name from tbacct where extract(month from acct_timestamp) = 11 ...
>
> is there any way of using an index for selecting some rows, e.g.
> selecting all data from one month?
What about select blah from foo where month >= 2000-11-01 and month < 2000-12-01
Fix up as appropriate.
mrc
-- Mike Castle Life is like a clock: You can work constantly dalgoda@ix.netcom.com and be right all the
time,or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day. -- mrc We are all of us living in the shadow of
Manhattan. -- Watchmen