Subject | Re: Question on Month date range in SELECT statements |
---|---|
Author | Anderson Farias |
Post date | 2006-10-19T19:22:48Z |
"mspencewasunavailable" <firebird@...> wrote:
use an index for the search and, as stated initially the table has
milions of records so this can be very ineffective.
a between 'first-day-of-month' and 'first-day-of-next-month' whould
be more effient. or, have a 'month' collum filled by triggers.
just a thought
Regards,
Anderson Farias
> You want EXTRACT. This works for me:Althougt this is true, the problem here is that extract won´t let fb
>
> select count(*) from sometable
> where EXTRACT(MONTH from timestampfield)
> <> Extract(MONTH from CURRENT_DATE)
>
use an index for the search and, as stated initially the table has
milions of records so this can be very ineffective.
a between 'first-day-of-month' and 'first-day-of-next-month' whould
be more effient. or, have a 'month' collum filled by triggers.
just a thought
Regards,
Anderson Farias