OK, first of all, that works, thank you very much.
Second; I really want to get this .
You are creating a table with orderline info and all the info from the temp table, and after that, you join on startdate, enddate, itemcode, to get the price in. Right?
I struggled with the intervalmatch and the second constraint (item). Thanks, I learned from this.