Below is my table stature and data.
EMPLID EMPL_RCD EFFDT Eff_SEQ HR_STATUS PER_ORG
--------- --------------- ------------- ------------ ------------------ --------------
722243 0 21-NOV-18 0 A CWR
722243 0 15-MAY-19 0 A CWR
722243 0 20-MAY-19 0 I CWR (Employee in active as CWR)
722243 1 20-MAY-19 0 A EMP
120707 1 14-MAY-19 0 A EMP
120707 0 29-MAY-19 0 I EMP
120707 1 29-MAY-19 0 I EMP (Employee inactive as EMP)
120707 2 29-MAY-19 0 A CWR ( Employee active as CWR)
when i pass month start date and end date in my query('01-MAY-2019' AND '31-MAY-2019') the query should display the data like below for emplid 722243 and 120707.
EMPLID Date PER_ORG
---------------------------------------------------------
722243 01-MAY-19 CWR
722243 02-MAY-19 CWR
722243 03-MAY-19 CWR
722243 04-MAY-19 CWR
same should display until
722243 09-MAY-19 CWR
120707 29-MAY-19 CWR
120707 30-MAY-19 CWR
120707 31-MAY-19 CWR
Please help me out on this.