2 Replies Latest reply: Oct 11, 2012 2:58 AM by Kees den Boer RSS

    Update fields in a history.qvd file

    Kees den Boer
      SET ThousandSep='.';
      SET DecimalSep=',';
      SET MoneyThousandSep='.';
      SET MoneyDecimalSep=',';
      SET MoneyFormat='€ #.##0,00;€ -#.##0,00';
      SET TimeFormat='h:mm:ss';
      SET DateFormat='D-M-YYYY';
      SET TimestampFormat='D-M-YYYY h:mm:ss[.fff]';
      SET MonthNames='jan;feb;mrt;apr;mei;jun;jul;aug;sep;okt;nov;dec';
      SET DayNames='ma;di;wo;do;vr;za;zo';
      [History List]:
      load * inline [%KeyInvoice, a , b 
      123456,'a','b'];
      outer join
      load * inline [%KeyInvoice, c , d 
      123456,'c','d'
      123457,'c','d'];
      outer join
      load * inline [%KeyInvoice, e , f 
      123456,,'f'
      123458,'e','f'];
      [Combinatie]:
      load
      %KeyInvoice,
      if(e<>'',e,if(c<>'',c,a)) as a,
      if(f<>'',f,if(d<>'',d,b)) as b
      resident [History List];
      drop table [History List];
      store [Combinatie] into History.qvd;
      
      
      HI,

       

       

       

      I have the following issue in QlikView:

       

      I have a histroy table stored in a QVD. That one I load first in QlikView. In the example I doens't, because I want to show the used vales.So instead of a LOAD FROM I use LOAD INLINE.

       

      From several sources I want to update the history and store it back to the QVD file. So if a %KeyInvoce exist in [History List], I wnat update the field a and b withe the values d and c or e and f.

       

      If the %KeyInvoice [History List] doens't exst an new record should be create with the %KeyInvioce and the values c and d or e and f in the fields a and b.

       

      When finally done we restore everything back to the QVD file.

       

      With the code I paste here it doesn't work.

       

      Would you please help me out with this?

       

      Thanks,

       

      Kees