Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner - Creator III
Partner - Creator III

mutiple table Load error

Hi All,

am tryng to load multiple table from Sql with the script below. The script works fine and loads all the table which it stores into qvd but in the end I receive the following error.

Tables:
Load * Inline [name
table1
table2
table3
table4
table5
];


For i = 1 to NoOfRows('Tables')
Let TN = Peek('name',$(i),'Tables');
TRACE Processing File: $(TN).qvd;
$(TN):
LOAD*;
SQL SELECT *
FROM $(TN);

STORE $(TN) into $(vQVDExtractPath)Tables_$(TN).qvd (qvd);
Drop Table $(TN);
Next i;

ErrorCode:

Unknown statement

:

LOAD*


Any idea why I am receving the error in the end?

Thanks

1 Solution

Accepted Solutions
kenphamvn
Creator III
Creator III

Hi

Please try this

For i = 0 to NoOfRows('Tables') -1

instead

For i = 1 to NoOfRows('Tables') -0

View solution in original post

4 Replies
Anil_Babu_Samineni

May be declare this statement like

Select * from ...;

Load * resident $(TN);

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
didierodayo
Partner - Creator III
Partner - Creator III
Author

Hi Anil that is also returning the same error.

For i = 1 to NoOfRows('Tables')

Let TN = Peek('name',$(i),'Tables');

TRACE Processing File: $(TN).qvd;

$(TN):

SQL SELECT *

FROM $(TN);

LOAD* Resident $(TN);

STORE $(TN) into $(vQVDExtractPath)Tables_$(TN).qvd (qvd);

Drop Table $(TN);

Next I;

kenphamvn
Creator III
Creator III

Hi

Please try this

For i = 0 to NoOfRows('Tables') -1

instead

For i = 1 to NoOfRows('Tables') -0

didierodayo
Partner - Creator III
Partner - Creator III
Author

Thanks An, that is what it was.