6 Replies Latest reply: Jun 21, 2013 7:57 AM by Sara Famiglietti RSS

    Join two QVDs with date between two date

      Hello,

       

      I have two tables stored into qvd:

       

      Article.qvd

      Article
      Purchase_date
      A101/12/2012
      A215/08/2012
      A301/01/2013
      A403/03/2013
      A521/04/2013

       

       

      Price.qvd

      ArticlePriceStart_DateEnd_Date
      A1501/01/201231/12/2102
      A1701/01/201331/12/2013
      A21001/01/201230/06/2012
      A2801/07/201231/12/2103
      A3201/01/201331/12/2013
      A41201/01/201315/02/2103
      A41316/02/201328/02/2103
      A41501/03/210315/03/2013

       

      What I want is to create a table with the Article, the Purchase Date and the Price (the price is retrieve depending of the validty period):

      ArticlePurchase_datePrice
      A101/12/20125
      A215/08/20128
      A301/01/20132
      A403/03/201315
      A521/04/2013-

       

      So I need to do a join between article.qvd and price.qvd

      on Article.Article = Price.Article

      and Article.Purchase_Date between Price.Start_Date and Price.End_Date.

       

      I know how to do this in SQL but not with QVD file.

       

      Can someone help me?

       

      Thanks