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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
jensej
Creator
Creator

[resolved] Pass parameters to SQL query and make query for each row.

Hello There
Step 1.
I have a .txt file that Looks like this
10557;7311;2
10007;7311;2
10013;7311;4
10498;7311;2
10593;7311;4

Step 2.
From the .txt i want to fill this contexts.
0683p000009MBB0.jpg 0683p000009MBB0.jpg
Step 3. 
Now i want to use the contexts in my SQL query like this.

WHERE ag.ArtikelNrLAG = context.par_Artikel and a.AdressNrADR = context.par_AdressNrADR 










                                                                          

 Step 4. My Problem is that i Need to make so many queries as i have rows in the text file and i dont know i how i can send row after row to my SQL. In this example i have 5 rows in my text file so i have to read the first row, fill the context and run the SQL. After that second row and so on.
0683p000009MBOB.jpg
I hope you understand what im trying to reach.                                                                            
 
Labels (2)
11 Replies
Anonymous
Not applicable

The variable names are case sensitive. Your column names start with a capital letter, but your globalMap variable names are lower case. Change the variable names to match exactly.
EDIT: I see you got there first 🙂
Ankitamalhotra
Contributor
Contributor

Hi
I have the same requirement.
But while performing the same steps I am getting the syntax error.
Please help and could you please give some help on incremental load and also elaborate on using context variables and global variables, declaring them and using them in sql queries.
Thanks