Learn more about Toad for SQL Server Find solutions and downloads at the |
< To bookmark a page, right-click the Page Title and select Add to Favorites / Bookmark This Page |
Toad for SQL Server 5.7 |
Variables are a powerful feature that allow you to change data in your script or use a dataset collected from an activity in the automation script. For example, you can use variables to perform the following tasks:
Note: You must surround a variable name with the # sign (for example, #sleep#).
This scenario describes generating a report for each product, but you can use variables for a variety of reporting purposes:
Scenario Your Sales Manager wants a separate sales report for each of the company's products every week. He wants you to email the reports to him after they are generated. To provide the reports to the Sales Manager, you need to create the product queries and the sales report. Then, you can use them in an automation script to run the queries, generate reports, and email the Sales Manager every week. |
Scenario Your company has a web site that customers use to order products. The orders are automatically batched, and each order is recorded as a row of data. When the batch is sent, it updates a column in the order row. You need to run a daily report to find orders that were submitted but not batched. If there are any unbatched orders, you need to send an email to yourself with a list of the unbatched orders. If there are no unbatched orders, you need to send an email to yourself so you know that all orders were batched successfully. |
Use Database Automation Activities
Use File Automation Activities
Use System Automation Activities
Debbie Peabody's Automation Blog