Musíte použít dotaz takto:
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');
Musíte použít dotaz takto:
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');