hi can anyone see what is wrong with this syntax? it is driving me mad!! thanks in advance

Paul

SELECT MAX(caldate) AS Date

FROM (

SELECT TOP 5 caldate

FROM Calendar

WHERE caldate > date add(day, DATEDIFF (day, 0, curdate()), 0)

and WORKINGDAY = 'Y'

ORDER BY caldate

) c