Many Toad Data Point users like to use the Toad Editor. It is very flexible for free handing SQL and scripts. But did you know that you can save your result sets to a file? The file extension for this is *tef (Toad Editor file). This can be very useful if you want to retain a result set without re-querying the database. Simply save the file as a Toad Editor file.

 

 

To automate this you can use the “Select to Editor with Results” activity located in the database activities. Enter your SQL and set the file name.

Let’s look at another example where this may come in handy. In my environment there is a foreign key table called regions. This table changes daily and I want to know what are the new rows for that day. In this case I want to compare results from the prior day. To do this use the “Append results” option. Now every time I run the automation script it will add a new results tab to the file.

Now I can open the file and compare the result set to any other result set in the file. Right click on the results you want to compare and select any other results. This will also include results from other editors. Choose a primary key and you will get a display of differences.

 

 

About the Author

Debbie Peabody

Debbie Peabody is a Software Development Team Lead. She joined Quest in 1997 coding for Quest’s SQL Tuning product SQLab. She brings many years of experience of development on database tool products and co-designed Toad Data Point.

Start the discussion at forums.toadworld.com