If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
I have a code
My_Table_Raw:Load Chr(39) & Col1 & Chr(39), Chr(39) & Col2 & Chr(39), Chr(39) & Col3 & Chr(39)
;Select Col1,Col2,Col3 from SQL_Server_Table;
My_Table:NoConcatenateLoad *, '(' & Col1 & ',' & Col2 & ',' & Col3 & ')' as Col_Vals_Concat
num_rows = NoOfRows('My_Table');
For i to num_rows-1 let Concat_Values = Peek('Col_Vals_Concat', $(i),'My_Table')
SQL insert into table1 (Col1,Col2,Col3) Values $(Concat_Values) ;
Suppose there are 10 rows. I am able to run the loop 5 times but at the 6th iteration it throws an error."The following error occurred:Connector reply error: SQL##f - SqlState: 42000, ErrorCode: 1003, ErrorMsg: SQL compilation error: syntax error line 16 at position 2 unexpected 'Next'."
Not sure why the error pops up as it ran 5 times before without error. Any suggestions.
take a look at this article, its talks exactly about your problem.
Bitmetric Friday Qlik Test Prep - Week 6 - Looping tables - Solution | LinkedIn
if its help you to resolve the problem, please close the issue, thanks