Hi Tom,
I want to show the absence of my people in an APEX form / editable grid. The absence is shown for every day and the day column should be generated automatically.
Current SQL code:
with rws as (
select person.name,
absence.start as dy,
case
when absence.type = 'Vacation' then 'V'
when absence.type = 'Homeoffice' then 'HO'
end as text
from absence
join person on person.id = absence.person)
select * from rws
pivot(
min(text) for dy in ('06.03.2019', '06.04.2019')
)
It should look the following way:
Persons 06.03.2019 06.04.2019 06.05.2019
Henry HO x V
Tom x HO x
with '06.03.2019' as the sysdate and should show the following e.g. 90 days. This column should be updated automatically, so that I don't need to write all those dates by hand.
Thanks in advance for your help
Patrizia