Based on the parameter year i should get the data based on that year i should get the data.
lets say the paramter is audit_year = '31-12-2021'
the requirement is something that we should get the data based on the parameter i.e i should get the person record based on the above parmeter year.
for example lets assume that audit_year = '31-12-2022'
the person is inactive in 2022 so i should get that record only
if the audit_year = '31-12-2021' this person is active in that year so i should get that year only.
what i did is in the sql i gave as
trunc(:audit_year) between paam.effective_start_date and paam.effective_end_date