Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
I wish to treat this table below as if there will be not further update to the records, but however generate from resident or perhaps autogenerate with only updates in the date field (incremental) as depicted in the desired table.
Many thanks.
Sample Table
Date | Name | Amount | Return on a daily basis |
2/4/2022 | LeJordan Minks | 1,800 | 0.79 |
Desired Table
Date | Name | Amount | Return on a daily basis |
2/4/2022 | LeJordan Minks | 1,800 | 0.79 |
3/4/2022 | LeJordan Minks | 1,800 | 0.79 |
4/4/2022 | LeJordan Minks | 1,800 | 0.79 |
[FinalTable]:
LOAD DATE(Date + ITERNO()-1) AS Date,
Name,
Amount,
[Return on a daily basis]
RESIDENT [Sample Table]
WHILE ITERNO() <= TODAY() - Date;
DROP TABLE [Sample Table];
can you specify how the resulting table can be derived from your sample table?
@MarcoWedel So the intial load was from a QVD as shown below with the assumption that the QVD will not be updated again. Thus, I want to continue adding to the already loaded table importantly with increasing date.
[Sample Table]:
LOAD Date,
Name,
Amount,
[Return on a daily basis]
FROM TransacTable.qvd(qvd);
Hope this clarifies things, and thanks.
[FinalTable]:
LOAD DATE(Date + ITERNO()-1) AS Date,
Name,
Amount,
[Return on a daily basis]
RESIDENT [Sample Table]
WHILE ITERNO() <= TODAY() - Date;
DROP TABLE [Sample Table];