Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Creating table name with Variable


Basicallty I want to loop through this table giving it a new name by combining "Prod" and the value of i.  So it would be Prod1, Prod2, Prod 3, Prod4 and Prod5.  How can I add the value of i to "Prod" so I get five sepearate tables?

For i = 1 to 5

Prod:

Select *

Resident PreProd;

Next i

Thanks in advance

Steve

1 Solution

Accepted Solutions
Not applicable

Just use your counter in the tablename, you will need to use noconcatenate to keep them separate though otherwise as the fields are the same the tables will auto concatenate

For i = 1 to 5

Prod$(i):

Noconcatenate

Load *

Resident PreProd;

Next i

hope that helps

Joe

View solution in original post

4 Replies
Not applicable

Just use your counter in the tablename, you will need to use noconcatenate to keep them separate though otherwise as the fields are the same the tables will auto concatenate

For i = 1 to 5

Prod$(i):

Noconcatenate

Load *

Resident PreProd;

Next i

hope that helps

Joe

marinasbc
Partner - Contributor III
Partner - Contributor III

Hi,

For i = 1 to 5

Prod$(i):

Select *

Resident PreProd;

Next i

Regards,

Marina

Anonymous
Not applicable

try this...

qualify *;

for i = 1 to 5

Prod$(i):

load *

resident PreProd;

next i

zagzebski
Creator
Creator
Author

Thanks!