SQL Query to get the Department name and Assignment number

select pd.name department_name , paaf.assignment_number 
from per_all_assignments_m paaf , per_departments pd 
where pd.organization_id(+) = paaf.organization_id
and trunc(sysdate) between trunc(paaf.effective_start_date) and trunc(paaf.effective_end_date)
and trunc(sysdate) between trunc(pd.effective_start_date(+)) and trunc(pd.effective_end_date(+))
and paaf.assignment_type = 'E'
and paaf.assignment_status_type= 'ACTIVE'

I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.

SQL Queries (SQLQ)
Posted by : Mohammad