Hi I am using dynamic input tool to update the where in clause in SQL query.
For one of my runs I wish to bypass the where clause as in query all the rows in the table. Can I use a specific character in the text input to achieve this without having the change SQL code?
Solved! Go to Solution.
Can you post the configuration of your Text Input and Dynamic Input tools?
It is a pretty straight forward one, am using JNP column to replace the inputs for where clause:
You can essentially create your where statement dynamically with a formula tool. This can account for one of them just being blank so it processes all records.
Instead of using the dynamic input to replace the where clause, replace the entire where clause with the dynamically created one. This adds one that is just blank, so it will essentially exclude the where.
In this case you're trying to feed in multiple values, so you'll want to construct a new field before the Dynamic Input, say "STRING_REPLACEMENT", with a value of something like Item IN ('811-01','310-05','310-01'). And then use that for your replacement.
If you want to feed in each value one by one and run the query once for each value, and stack the results, then that would be a batch macro.