Toad World® Forums

Import query results, and keep them actualized on an Excel CSV file

Basically what I'm wondering is if it's possible to create a query on Toad, send the grid result to an Excel file, and then if the data that is displayed on the query is changed, change the data also on the Excel file. I tried to use an update on a simple query :

On the first row, on the text_id field, 'M00001Hola', added the Hola.

Then on the Excel file,After clicking on the button of Actualize everything, it doesnt show the changes. Is it possible to do it, or there is some other way?

The result set changes, or a refresh of the query results, will need to be pushed to Excel, since it is a separate solution apart from Toad. Doesn't happen automatically, say, where any change on the database side is streamed to Excel.

However, there are several ways to accomplish a refresh of the Excel workbook. One is the way you already mention, where you simply right-click on the data and perform an Export to refresh the latest results in your worksheet.

The second way is to set up a quick Automation job that will execute your query and send the results to a file (Excel) of your choice, including overwriting to the same file. See screen snapshot below.

So, it's not possible no refresh it manually by Excel right? Its because I was trying to set up an easy way for non-SQL-knowing persons, where they would just need to refresh it by Excel.

Correct me if I missunderstood, you need to create a table and insert the query there right? Because I was wondering if I would need to create a table for each created query where my client wants to refresh it.

Trying to understand better your requirement.
Are you asking if it's possible to make changes in Excel and push it back to the database table, or Query results?

If yes, then no, there's no "replication" link-up that TDP is doing between the database table or data grid and the Excel worksheet. It's possible to import changes from Excel to the database, and even automate this process, but it doesn't happen in a real-time/live streaming fashion within the product.