Jesse Brown wrote:
>
> Hello Folks. I am looking for a way to do this in a single query, and I
> was not able to find much enlightenment in the docs, and I was hoping
> someone on the list could help..
>
> I would like to get the number of entries with START_TIME's (in DATETIME
> format) before the specified date that have END_TIME's (in DATETIME format
> as well) after the specified date. Currently the only way I can think of
> doing it is to fetch each date, convert each to UNIX_TIME, and then do the
> compares. However because subselect's are not implemented yet, this means
> a number of different querys. Any ideas?
>
> -J
>
> --
> Jesse Brown [jesse.brown@stripped] - PGP Key ID = C4AB128D
Hi Jesse
How about just using this:
SELECT
count(*)
FROM
yourTable
WHERE
START_TIME < 19990325083159
AND END_TIME > 19990325083159
Tschau
Christian
| Thread |
|---|
| • Date query help? | Jesse Brown | 25 Mar |
| • Re: Date query help? | Christian Mack | 25 Mar |