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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
cmills
Contributor
Contributor

Looping through SQL results

I'm wanting to do a SQL query that will give me a list of values
001
002
003
etc.
Then I want to do a process for each returned value where I do some further lookups based on the value, and a denormalize in order to batch the further lookups together.
I need to only look at one initial value at a time due to the denormalize. (At least I believe I have to do it that way)
Any help on ways to go about this would be appreciated, I've imagined using a tLoop, or maybe just iterating off the results, but I'm not sure how I would go about that, as I can't Iterate to a map, etc.
Labels (2)
1 Reply
Anonymous
Not applicable

Cmills,
I would use a tFlowToIterate and a tFixedFlowInput.
In tFlowToIterate you should disable the default and add a key choosing your column name that contains your list of values. (001,002..)
In your tFixedflowInput you should put the number of rows to 1 and add a column containing the following as value: ((String)globalMap.get("Key Name in tFlowToIterate ")).
So I guess your job would look something like:
tMssqlInput --> tFlowToIterate -(Iterate Link)-> tFixedFlowInput --> Tmap (for your lookups) --> ..
That's how I would do it.
Regards