problem with SELECT *,YEAR(InventionDate) AS invy FROM Invention,Manufacturer WHERE Invention.ManufacturerID=Manufacturer.ManufacturerID AND Visibility='y' AND YEAR(InventionDate)>=0 AND YEAR(InventionDate)<=9999 ORDER BY InventionDate;