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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator III
Creator III

for..next around a table

Hi All,

In the attached demo app, If you open Script editor 'orders' tab in table [Order Detail] I see the below code-

For i = 1 to 3 ...NEXT

I am wondering, what the for..next doing to the [Order Detail] table and where the i = 1 to 3 came from.

Please explain me with an example.

Thanks!!

Regards,

Suraj

Labels (1)
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

There could be three Worksheet in AdventureWorks.xls file

SalesOrderDetails1

SalesOrderDetails2

SalesOrderDetails3

Instead of loading three different load as below

[Order Detail]:

LOAD SalesOrderID,

     SalesOrderDetailID,

     ...

     CostAmount

FROM

[..\Database\AdventureWorks.xls]

(biff, embedded labels, table is SalesOrderDetails1)

WHERE EXISTS(SalesOrderID);

here For Next Loop is used...

When i = 1 SalesOrderDetails1

When i = 2 SalesOrderDetails2

etc..

Hope this helps...

View solution in original post

2 Replies
MK_QSL
MVP
MVP

There could be three Worksheet in AdventureWorks.xls file

SalesOrderDetails1

SalesOrderDetails2

SalesOrderDetails3

Instead of loading three different load as below

[Order Detail]:

LOAD SalesOrderID,

     SalesOrderDetailID,

     ...

     CostAmount

FROM

[..\Database\AdventureWorks.xls]

(biff, embedded labels, table is SalesOrderDetails1)

WHERE EXISTS(SalesOrderID);

here For Next Loop is used...

When i = 1 SalesOrderDetails1

When i = 2 SalesOrderDetails2

etc..

Hope this helps...