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

How to read value from text tool into SQL query

csh8428
11 - Bolide

I know this is a somewhat basic request, and it seems doable using the dynamic input tool. I have been trying to get it to work and just can't seem to get it right even after reading numerous similar threads in the community.

 

I have a long SQL query that has the same date value in many lines of the WHERE clause. I need to constantly edit this value and currently have to find/replace every time I want to do that.

 

I can't provide the exact SQL for data security reasons but below should be sufficient for creating an example workflow

 

 

SELECT *
FROM HR_FILE
WHERE BIRTHDATE = '2020-10-01' -- this is the date I need to manually change quite often

 

 

What I need to do is be able to change the BIRTDATE value without having to open the query each time, but NOT as an app. 

 

Thanks for any help!

 

Craig

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @csh8428 

 

Just a thought. How about converting that app to macro with user input instead 🙂

csh8428
11 - Bolide

I'm the only one who uses it and and it's done through desktop; not on the server. Unless I'm misunderstanding your solution. Even so, not sure if I'm strong enough with my Alteryx skills to achieve that either.

nmosley1
7 - Meteor

I have something similar set up for one of our processes.  It's really convenient once you get the Dynamic Input set up.  First off, where are you inputting the new date?  I typically use a Text Input tool with a single record.  You can connect this to an Interface/Action tool relatively easily if you later decide to set up as an app.  Connect the Text Input tool to your Dynamic Input tool.  Data connection and query go in the top "Input Data Source Template."  Now to set up the query change your date parameters to something like 'DateString'  then in the Dynamic Input tool update the Modify SQL Query to "Replace a Specific String:  DateString".  The RepalcementField will be whatever you named the field in the Text Input tool

Labels