I am trying to select those faculty rows which have the same month of birth as that of students, but this code doesn't seem to work. "SQL Error: ORA-00904: "MONTH": invalid identifier" is the error being displayed.
SELECT STUDENT.FIRSTNAME, STUDENT.DOB, FACULTY.FIRSTNAME, FACULTY.DOB
FROM STUDENT, FACULTY
HAVING MONTH(STUDENT.DOB) = MONTH(FACULTY.DOB);
havingtowhere(or moving it to an actualjoin-- generally I recommend avoiding commas in yourfromclause)... If that doesn't work, post sample data and expected results.extract(month from student.dob).