Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic SQL Dates

cyoung3
6 - Meteoroid

Hi, 

I am trying to create a connect in-db query that updates the dates of my query each period. We are on a retail calendar year so the dates are not always just the first and last day of the month. 

 

I have a macro input in-db that grabs the first date of the period, and I'm trying to update it in my query but it gives me the error in-DB Macro Inputs and Outputs can only be used in a standard macros. I also tried to have a user input for date and action it in (a less ideal option) but the string in the query isn't actually updating. I've included the stream I am working with. 

 

The macro is a query that returns the date I want to pass through the query, and the action is replacing the date string in the query. Any advice on how I might be able to achieve similar results? I have been able to do the same things using the dynamic input tool, but it returns all the data to my machine and slows everything down. I need to get this into in-db to manipulate the data before returning to my machine. Also, I do not have the access to create temporary table which was another option that seemed to have promise if I did. 

 

cyoung3_0-1602879719731.png

 

1 REPLY 1
cyoung3
6 - Meteoroid

Or alternatively, is there a way to get a query in dynamic input back into the in-db tools? When I try to data stream it back in it will only let me do it if I create a temporary table.

Labels
Top Solution Authors