Forum Discussion
shamilka
2 years agoFrequent Visitor
Need to add a history table for each data refresh
Hi,
I need to add a history table with a data refresh date column. So for each data refresh, the refresh date for each row has to be added in a refresh date column. There should not be any duplicates if the coped row is already there. Also, I need to count the number of open days by getting todays date into consideration well as the refresh date. Please check the input as well as desired output table below.
It would be ideal if I can copy data to a new table since I would be able to have a table for current data as well as history data.
Input
| Status | PN | SN | Batch no | QTY | P |
| Install | ABC4 | 3001 | 114 | 1 | XXA |
| Remove | ABC3 | 2001 | 115 | 1 | XXB |
Output
| Status | PN | SN | Batch no | QTY | P | Refresh date | Open days |
| Install | ABC4 | 3001 | 114 | 1 | XXA | 17/04/2024 | 0 |
| Remove | ABC3 | 2001 | 115 | 1 | XXB | 10/04/2024 | 7 |