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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

delete a range using query output

Hi,
I have to insert a time based set of rows into a target table. The target table may have existing rows within that time range so I have to first delete any of those rows from the target table. I get the min and max range values via a query to my source database and then store those in global variables. How to I generate the delete statement using those values as the range values?
I.e.
delete from T where dt > ? and dt <= ?

Or is there a better way to do this?
Thanks,
David
Labels (2)
10 Replies
alevy
Specialist
Specialist

I'm not sure what you mean by "can't find the variables from the previous steps". They won't be on the globalMap unless you put them there but you can directly reference the row variables. See below where the tMSSqlRow inserts a row for each iteration and then tMSSqlInput reads it out.