Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
manuelsavini
Contributor
Contributor

Filling certain date intervals

Basically I have a table made like this. 

where "giorni" field is the maximum amount of days that can be used within that given contract(This is the definition table of various contracts) 

 
 

dataInizioContratto = Contract start date

dataFineContratto = Contract end date

%progressivo= contract ID

giorni = days

image.png

I also have a table made like this:

durata ticket: ticket duration

data inizio ticket: ticket start date

data fine ticket: ticket end date

image.png

I have to fill the contracts usage with these tickets (all contracts are filled up exept the last one wich is still not full)

 

I need the part of code to create another ID field in the second table wich describes in wich contract the contract will be put in.

The main problem is that 2 couples of contracts are overlapped and in that case i need to first fill the first, then the second contract.

(do not notice the null lines please)

Thank you

0 Replies