Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I created simple table:
Table1:
Task | Date_Start | Date_Finish |
---|---|---|
A | 2014-01-01 | 2014-02-01 |
B | 2014-01-02 | 2014-02-02 |
C | 2014-01-03 | 2014-02-03 |
and what I want to do is simply track commited changes, so on the first reload i created qvd file with Table1. Then i added some code to the script which in my mind should check excel file and if some user have changed or add something it should show up in Table1, for example user have changed Task A and add 😧
Task | Date_Start | Date_Finish |
---|---|---|
A | 2014-01-15 | 2014-02-01 |
D | 2014-03-01 | 2014-04-01 |
in result i want to have :
Table1:
Task | Date_Start | Date_Finish |
---|---|---|
A | 2014-01-01 | 2014-02-01 |
A | 2014-01-15 | 2014-02-01 |
B | 2014-01-02 | 2014-02-02 |
C | 2014-01-03 | 2014-02-03 |
D | 2014-03-01 | 2014-04-01 |
in Table1 I also have column Today_Date because i reload this script daily and this allows me to see when changes were commited.
When i try to join qvd file with excel it just get all the rows from qvd with previous date and add everything from excel with current date so in result some rows are duplicated.
Any idea how to avoid this duplicated rows ?
Hi Jacob,
you may use a where condition like on second table (load original tble first then new table)
LOAD ....
WHERE NOT Exists(Key_from_origin, Key_just_read) -- have to define your keys like A-Date or what you need
best reagrds
Chris