Du skal bruge en forespørgsel som denne:
SELECT * FROM TIME_PERIOD WHERE
(YEAR(DATE_FROM) >= '2013' OR (YEAR(DATE_FROM) >= '2012' AND
MONTH(DATE_FROM) >= '10')) AND
(YEAR(DATE_TO) <= '2013' AND MONTH(DATE_TO) <= '12');
Du skal bruge en forespørgsel som denne:
SELECT * FROM TIME_PERIOD WHERE
(YEAR(DATE_FROM) >= '2013' OR (YEAR(DATE_FROM) >= '2012' AND
MONTH(DATE_FROM) >= '10')) AND
(YEAR(DATE_TO) <= '2013' AND MONTH(DATE_TO) <= '12');