Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Selecting all in Dynamic input tool

satya2804
5 - Atom

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? 

 

satya2804_0-1605876619793.png

 

4 REPLIES 4
mbarone
16 - Nebula
16 - Nebula

Can you post the configuration of your Text Input and Dynamic Input tools? 

satya2804
5 - Atom

It is a pretty straight forward one, am using JNP column to replace the inputs for where clause:

 

satya2804_4-1605878745027.png

 

 

satya2804_3-1605878672979.png

 

echuong1
Alteryx Alumni (Retired)

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.

 

echuong1_1-1605880217889.png

 

 

echuong1_0-1605880148775.png

 

mbarone
16 - Nebula
16 - Nebula

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.

Labels