I have a registration_date column which includes both the date and the time of when staff registered which is located in the staff table and an enroll_date column which also includes the date and time but is stored in the enrollment table. I can join these using s.employeed_id = e.employee_id. The problem is Iwant to be able to retrieve the date and the time from the registered column as well as the date and time of staff who ENROLLED on 02-FEB-18 how can I do this? I have attempted but I don't get any results.
SELECT S.EMPLOYEE_ID, S.LAST_NAME, TO_CHAR (REGISTRATION_DATE, E.ENROLL_DATE, 'DD MON YY HH:MI:SS'), E.SECTION_ID
FROM STAFF S, ENROLLMENT E
where TO_CHAR (E.ENROLL_DATE, 'DD MON YY')= '30-JAN-07'
AND S.EMPLOYEE_ID = E.EMPLOYEE_ID;