Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Need to execute a "dynamic" SQL sentence before inserting the final data


Hi gurus, I need to delete records with a dynamically generated condition, concretely a date, as in "delete * from table where date1<'my_date'", with my_date given by another block, and do this before I insert the final data. 


¿It is possible?


thanks in advice!

Alteryx Certified Partner

Output Data tool has a "Pre Create SQL Statement" configuration option that allows you to execute SQL statement before committing records to database.


To make the SQL statement dynamic, you'll have to put the Output Data tool in a macro and use an Action to update the "Pre Create SQL Statement" at run time.

Alteryx Certified Partner