Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

chesterluck
Contributor II

Incremental load (update 7 past month)

Hello

I want to do an incremental load. From the basis qvd I want to take everything earlier then 7 month (7*30 days) and then find out the highest ID.

is this script correct?

 

LOAD

lMacStaRef,
Beginn

FROM
..\..\02_Data\Result1.qvd
(
qvd) where (Interval(Now() - Beginn) >= 210);

Let UpdateID = Max (lMacStaRef);

Thx in advance

1 Solution

Accepted Solutions
chesterluck
Contributor II

Re: Incremental load (update 7 past month)

Thanks

To show use MsgBox ('$(UpdateID)')

FullSolution:

Tab:

LOAD

 

lMacStaRef,

Beginn

FROM

..\..\02_Data\Result1.qvd

(
qvd)

where (Interval(Now() - Beginn, 'd' ) >= 210);


Temp:

LOAD

 

Max

(lMacStaRef) as x

RESIDENT Tab;


LET UpdateID = peek('x',-1,'Temp');

Next:

Load

 

MsgBox ( '$(UpdateID)') as t

 

Resident Temp;

Drop Temp;

4 Replies
dt_adamwilson
Contributor

Re: Incremental load (update 7 past month)

try:

where (Interval(Now() - Beginn, 'd' ) >= 210);

chesterluck
Contributor II

Re: Incremental load (update 7 past month)

thx,

how can I test whether QlikView selected the (right) ID??

I wanted to show the variable with

Load

MsgBox($(UpdateID) as x

Resident Tab;

But sth was wrong. Any idea??

Cheers //chesterluck

dt_adamwilson
Contributor

Re: Incremental load (update 7 past month)

this should put the max lMacStaRef in the UpdateID variable:

Tab:

LOAD

lMacStaRef,

Beginn

FROM

..\..\02_Data\Result1.qvd

(qvd)

where (Interval(Now() - Beginn, 'd' ) >= 210);

Temp:

LOAD

Max(lMacStaRef) as x

RESIDENT  Tab;

LET UpdateID = peek('x',-1,'Temp');

Drop Table Temp;

chesterluck
Contributor II

Re: Incremental load (update 7 past month)

Thanks

To show use MsgBox ('$(UpdateID)')

FullSolution:

Tab:

LOAD

 

lMacStaRef,

Beginn

FROM

..\..\02_Data\Result1.qvd

(
qvd)

where (Interval(Now() - Beginn, 'd' ) >= 210);


Temp:

LOAD

 

Max

(lMacStaRef) as x

RESIDENT Tab;


LET UpdateID = peek('x',-1,'Temp');

Next:

Load

 

MsgBox ( '$(UpdateID)') as t

 

Resident Temp;

Drop Temp;

Community Browser