Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Infinite loop Problem

Hi,

I am executing the following code:

LET a = 1;

do while ($(a) <= 3)

LOAD

Department_Key,

BUDGET AS NBUDGET

RESIDENT Table

LET a = a + 1;

loop



---

This is rendering me an infinite loop.

Where am I goin wrong..pls help

Regards,

Rohit

2 Replies
Not applicable
Author

I dont think you need $(a) in this case, as $(a) means to evaluate the expression, and your variable is not an expression, just a value.

Try first changing to DO WHILE a<=3


If this doesn't work then you might want to change the LET statements to SET statements, but I'm not sure you should need to do this.

biester
Specialist
Specialist

I think it should be:

do while (a <= 3)

Rgds,
Joachim