Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I'm having a table with contains a SerrialNumber, ValidfromPeriod, ValidToPeriod
In a second table i'm having SerialNumber, Period, Scans, ScansRunningTotal
I would like now to create a 3rd table containing for each period between ValidFrom and Valid To a record with the correct record from the 2nd table. When its missing for the specific period he takes the record from the previous period that he can find.
In a script with loops its working, but far to slow (over 5.000.000 Serials), can this be solved by a kind of intervalmatch ?
Found a solution by joining, but first i had to unpivot the table with FromPeriod and ToPeriod