Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

how to implement a date loop

i have to do a extraction loop of with dates

something like

let y=today();

for i='01/01/2012' to $(y)

ExtractTable:

select

.

.

.;

Store table into table_$(i).qvd;

drop table ExtractTable;

Next i

But i dont know whats wrong, qlikview didnt do anything.

how i do this??

1 Reply
sushil353
Honored Contributor II

Re: how to implement a date loop

Hi,

try this:

LET y=Today();

FOR i=Date('01/01/2012','DD/MM/YYYY') to '$(y)'

Cartera_COP:

//Query Statement

STORE * FROM Cartera_COP into ../01_Datos/Cartera_COP_$(i).qvd;

DROP Table Cartera_COP;

NEXT i

Community Browser