Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

FOR - NEXT loop next in load scripts

I'm trying to make load scripts including for-loop nested as below.

But it doesn't wok.

Is there anyboy who helps me to solve this?

Thank you for your cooporation,

For $(j)=1 to 3

LET i=1;

For $(i)=1 to 44

if j=1 or (j=2 and (i=1 or i=2 or i=4 or i=5 or i=20)) then

NTAB_temp:

LOAD

$(j) as j_count,

    $(i) as i_count;

SQL SELECT *

FROM "sample_database".dbo.TABLEA;

endif

LET i=$(i)+1;

Next;

LET j=$(j)+1;

Next;

Jun from TOYKO

1 Reply

Re: FOR - NEXT loop next in load scripts

Hi Jun,

I am not sure what you are trying to achieve. Try this,

For j =1 to 3

For i=1 to 44

if j=1 or (j=2 and (i=1 or i=2 or i=4 or i=5 or i=20)) then

NTAB_temp:

LOAD

$(j) as j_count,

    $(i) as i_count;

SQL SELECT *

FROM "sample_database".dbo.TABLEA;

endif

Next

Next

Community Browser