Hi,
I have this scenario: I load data (category and item code) every day. Of course I can easily add the extraction date, and I am able to load past data from qvd and concatenate them with the ones with today date
Category | Item Code | Extraction date |
A | 111 | 08/06/2019 |
B | 222 | 08/06/2019 |
C | 333 | 08/06/2019 |
Catalog_history:
LOAD *
FROM
Catalog_history.qvd
(qvd);
Concatenate
LOAD *,
'$(vToday)' as ExtractionDate
;
LOAD
[Item Code],
Category
FROM
Item.qvd(qvd);
store Catalog_history into Catalog_history.qvd(qvd);
(vToday previously declared as today date):
If tomorrow a catalog will change, I expect to have somthing like this:
Category | Item Code | Extraction date |
A | 111 | 08/06/2019 |
B | 222 | 08/06/2019 |
C | 333 | 08/06/2019 |
B | 111 | 10/06/2019 |
I'd like to have a result like this:
Category | Item Code | Extraction date | Validity start | Validity end |
A | 111 | 08/06/2019 | 01/01/2014 | 09/06/2019 |
B | 222 | 08/06/2019 | 01/01/2014 | 31/12/2070 |
C | 333 | 08/06/2019 | 01/01/2014 | 31/12/2070 |
B | 111 | 10/06/2019 | 10/06/2019 | 31/12/2070 |
where the modified data can be closed with Today-1 and a new row can be added with validity start date = today.
Has anybody got an idea to do this?
Thanks in advance!
Mike