from emp_unexcld eu,
where eu.department_id = d.department_id
and d.site_code = s.site_code
and eu.payroll_id = ds.payroll_id
and ds.department_id = d.department_id
and ds.reason_code = nar.reason_code
and nar.schedule_required_flag = 'Y'
and ds.site_code = s.site_code
and ds.site_code = bd.site_code
and ds.schedule_date = bd.drive_date
and ds.schedule_date >= sysdate
order by ds.schedule_date desc
I am trying to convert this into the above. Optional is outer join
1.employee in heartland (emp_unexcld)
link department_id of emp_unexcld to department_id of department(department) in heartland optional
2. link site_code of department to site_code of sites , site optional
3. link payroll_id of emp_unexcld to payroll_id in dept_staff optional
4. link department_id of dept_staff to department_id of department optional
5. link site_code of dept_staff to site_code of sites optional
6. link schedule_date, site_code of dept_staff to drive_date,site_code of blood_drives drive_date optional.
I have the query that I have done and posted on the top. But I need help in the outer joins as I mentioned above.