2 Replies Latest reply: Sep 16, 2014 7:42 AM by Arno Koopmans RSS

    Between / subquery /intervalmatch(?) issue

    Arno Koopmans

      Hi there,

       

      I have a load script issue and I cannot find the solution in Qlik Load language. In SQL this is super easy, with a subquery or someting, but I can't find the right solution.

       

      Here's my case.

       

      I have a table with costprices. When there is a new costprice, there will be a new line and the enddate will be filled out in the old recordline.

       

      StartDateEndDateItemPrice
      01-01-201331-12-2013X00013.45
      01-01-201431-12-2014X00013.55

       

      Now I also have a orderline table.

       

      OrderdateItemQuantityCostprice
      01-04-2013X000112
      01-02-2014X00115

       

      In the orderline table, I want to put the costprice of that time. As said, in SQL I would use a subquery or so and in QV I tried things with intervalmatch, but it didn't work out.How can I get the right costprices?

       

      Thanks in advance!