Toad World® Forums

Automation questions

I created a couple of import templates in 2.7 and brought YTD data from Oracle to SQL Server.

  1. How do I append the tables with just next weeks’ data going forward?

I can’t create a template to run my delete code. I get an error message that looks like only select queries can be saved.

  1. How do I automate deletion of some data from my new tables, initially YTD and then on weekly basis?



You can easily append the tables with the template similar to one you’ve created to get YTD data. Just make sure your SELECT statement returns next weeks’ data, your target is a table you want your data to be added to (select “A single existing table” radiobutton on the Select Target page of the Data Import Wizard) and Truncate table checkbox on Select Target page of the Data Import Wizard is unchecked.

To automate deletion of data from the table use Execute Script activity. DELETE FROM statement in it should define the scope of rows you want to delete.

Hope this answers your questions,