Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Update fields in a history.qvd file

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

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I didn't get an error messages, but an not correct result. I have strugled a litle bit more with my code and finally I found what went wrong. The problem is in the If(fieldname<>'',........

When I changed that into if(not isnull(fieldname),....... the result was what I expected. So I'm afraid that I made a common mistake. Anyway, thanks for your will to help.

View solution in original post

2 Replies
Not applicable
Author

Hi Kees,

do you get any error-message, did you debug the load-process. What exactly does not work?

Anonymous
Not applicable
Author

I didn't get an error messages, but an not correct result. I have strugled a litle bit more with my code and finally I found what went wrong. The problem is in the If(fieldname<>'',........

When I changed that into if(not isnull(fieldname),....... the result was what I expected. So I'm afraid that I made a common mistake. Anyway, thanks for your will to help.