2 Replies Latest reply: Sep 27, 2013 7:57 AM by Stanislav Jäger RSS

    QlikView InnerJoin with Intervalmach creates duplicate records, XRate



      I'm facing a really strange situation. After using following syntax, only SOME of my records are being duplicated.

      Situation: FactTable and TCURR (currency rates)



      load *, CurrencyLinkCurrencyDate from FactTable.qvd (qvd);



      CurrencyLink as CurrencyLink,
      toCurrency as _Currency,
      toCurrency as toCurrency,
      Date(fromDate, 'DD/MM/YYYY') as fromDate,
      Date(toDate, 'DD/MM/YYYY') as toDate,
      FROM $(vSource)TCURR_TCURF.qvd (qvd);


      inner JOIN (TCURR)
      INTERVALMATCH (CurrencyDate, CurrencyLink, Type)
      LOAD fromDate, toDate, CurrencyLink, Type RESIDENT TCURR;



      for the most of the records, just one XRate is found, which is correct.


      For some of them, additional, same record in the table TCURR will be created and therefore XRate is counted twice so high.


      Do you have any idea, why it is so, and how to prevent this behaviour? It could be, of course because of my inner join....


      TCURR: Type D, CurrencyLink EUR, toCurrency CHF, fromDate 01.08.2013, toDate 31.12.9999, XRate 0,8

      FactTable: Invoice 1, Sales 100, Currency EUR.


      Thank you