Hello,
I've studies lookup solutions but Iit still does not work.
I have 2 ora-tables.
- a lookup table KALENDER with DATE_START and DATE_END and a corresponding number ie
DATE_IN DATE_OUT PERIOD
20181101 20181124 10
20181125 20181212 11
20181213 20181215 12
20181216 20190114 13
20190115 20190125 1
20190126 20190228 2
20190301 20190310 4
20190311 20190322 5
- a table with a dossiernumber and a DATE_INVOICE.
DOSSNR DD_INVOICE
D099 20181120
D099 20190305
D125 20190127
D125 20190315
D127 20190306
There are more invoices per DOSSNR / YEAR.
The output should be like:
DOSSNR YEAR_2017 PER_2017 YEAR_2018 PER_2018 YEAR_2019 PER_2019
D125 2019 2,5
D127 2019 4
D099 2018 11 2019 4
Can you help me?