Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can we iterate using for loop to read records from Inline Loaded data

Hi All,

Can you please suggest me the way to iterate using for loop to read records from Inline data?

Thanks

3 Replies
fernandotoledo
Partner - Specialist
Partner - Specialist

I didn´t get exactly what you are trying to do, but the loop works this way:


for i=0 to 10
load $(i) as iteration,*;
load * inline [
DATA,
a,
b,
c,
d,
e
];
next


Search the autogenerate function in help, that should work fine too!

best regards,

Fernando D'Agosto

Not applicable
Author

Sanjay

Why would you want to execute a loop on an inline load? I don't understand the reason you would need to do this.

A load inline would normally list all of the records to load immediately after the LOAD INLINE statement, such as:

LOAD * INLINE
Field1,Field2,Field3
a,bb,231
c,ee,819
a,ff,473
];


Can you give more information.

Not applicable
Author

Hi Nigel,

Thank you for your quick response.

Actually i want to automate reloading of some qvd files and i will also want incremental loading of data into those qvd files.

For this, i can save name of tables, primary key and qvd file names in .csv file or as inline data.

After that i want to iterate through those tables for incremental loading based on the primary key and last modification date saved in qvd file.

Please suggest if i can do the same using different approach.

Thanks,

Sanjay