Hi All.
I'm having trouble figuring something out and I was hoping that someone in the community could help.
I'm writing a workflow that creates a daily backup of a specific SQL table. The workflow dynamically creates a table with today's date ('backup_20190729', for example) and then fills that table with the data. That process is clear and works fine.
Now the problem. I want to keep the past 31 days/tables and, when a new backup is created, drop the oldest table. I have worked out the process to identify the table to drop but I cannot figure out a way to dynamically drop that table. I know that you can run pre & post SQL statements but it looks like that only accepts a static statement. I also tried using a Dynamic Input tool and then updating the SQL command dynamically, but it adds a 'SELECT ' in front of it.
Is there any way to dynamically drop a SQL table?
Thank you for anything you can add, even if it's telling me to stop looking.
Solved! Go to Solution.
I figured it out. I was missing a Control Parameter. I adapted the solution from here.
Can you post your workflow here for reference