In Oracle date arithmetics, subtracting two dates results in the number of days between the two dates:
SQL> SELECT DATE '2000-12-31' - DATE '2000-01-01' year FROM DUAL;
YEAR
----------
365
Your WHERE
clause is therefore incorrect to Oracle since it cannot compare a number to a date. What exactly do you want to express with this comparison?
If you want to filter all dates before a given date, just compare the two dates:
SELECT * FROM SS.EMPLOYEE WHERE joindate <= to_date('2011-12-05', 'yyyy-mm-dd')
If you want to select all rows that are in a given interval, you can use multiple comparisons or the operator BETWEEN
:
SELECT *
FROM SS.EMPLOYEE
WHERE joindate BETWEEN to_date('2011-12-05', 'yyyy-mm-dd') AND SYSDATE
Update
The number of months between two dates is given by the function MONTHS_BETWEEN
. You would compare the result of this function to a number (of months).