Hello,
I have a table with invoices:
ID| Start date | End date | fee
18 1999-01-02 | 2018-01-02 | 3000
18 2012-01-02 | 2018-01-02 | 5000
In my query i can see all years and what the fee has been.
The problem is if customer has an old contract, example 1999-01-02 to 2018-01-02 and I add a new contract with the date 2012-01-02 to 2018-01-02, I will get two fees for each year from 2011 and further on.
I want a new contract to replace the old contract, but only from the "start date" on the new contract. How can i Solve this?
Thanks!
I have a table with invoices:
ID| Start date | End date | fee
18 1999-01-02 | 2018-01-02 | 3000
18 2012-01-02 | 2018-01-02 | 5000
In my query i can see all years and what the fee has been.
The problem is if customer has an old contract, example 1999-01-02 to 2018-01-02 and I add a new contract with the date 2012-01-02 to 2018-01-02, I will get two fees for each year from 2011 and further on.
I want a new contract to replace the old contract, but only from the "start date" on the new contract. How can i Solve this?
Thanks!