In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Pre SQL statement Delete based on an input value

klambert
7 - Meteor

I have a mysql table called update_date, the workflow uses this to recalculate everything after that date, when I push the updated results back into the table I want to run a pre SQL delete to remove the existing entries after that date and replace with the newly recalculated ones.

 

The update date changes, so I can't use a workflow constant. Is there a way to do this without having to completely write all the entries back to the table? And only write the updated ones back?

4 REPLIES 4
danilang
19 - Altair
19 - Altair

Hi @klambert 

 

If you put your output tool in a macro, you can pass in the Pre SQL in a field and use an interface tool to update it in the output tool.

 

Dan 

klambert
7 - Meteor

Thank you!

 

I dont suppose you have an example, or link I can go have a look at for more info?

danilang
19 - Altair
19 - Altair

hi @klambert 

 

Look at the second solution in this post.  It uses a macro to update a date in a preSQL statement

 

Dan   

apathetichell
20 - Arcturus
Labels
Top Solution Authors