This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have an analytical app in which I would like to use the Date Prompt Tool to allow a user to select a date. Then, that date will be used to update a value in a where clause in a SQL query. I have tried approximately one million things, and I cannot get it to work. Can anyone assist? Please let me know what additional information you need.
I want to tell you the secret, but I don't want to make this look too easy. You might be doing this as an in-db tool connect or as a standard input tool reading from your database. I'll answer this as a standard input tool.
I like to use a DYNAMIC INPUT tool for SQL parameter updates. You can copy your SQL from the input tool and setup a dynamic input tool. The tool will first ask you to setup a template. Go ahead and configure the template EXACTLY as you did in the Input tool (using your copied SQL). Next you can put a TEXT INPUT tool in front of the dynamic input. The TEXT INPUT will have a DATE_PARAMETER field that contains a properly formatted date (e.g. 2019-03-29).
Now you can read in the date and *Modify SQL Query
You'll add to update the WHERE clause and update your "fixed" SQL date with the value from the date parameter.
If you have any issues, please let me know.
Alteryx ACE & Top Community Contributor
Chaos reigns within. Repent, reflect and reboot. Order shall return.