Toad World® Forums

Exporting multiple query results to text file


#1

I am looking to simplify a process that I use daily. I create csv files daily that have multiple query results inside of them.

What I do now is run the first query and export it into a csv file. Then I run the second query and store that into a seperate file. I then cut and paste the contents of the second file into the first. I would use a union query to get them into one statement, but they do not have the same number/type of fields.

Does anyone know if there is an easier way to get both search results in the same file? Thanks in advance for any help!


#2

Unfortunately right now can’t do this and we are in feature freeze, but it’s already on next versions to do list that we’re adding the possibility of running an external application in an automation scripts. Then it will be trivial to concatenate the two files (Just do a copy with some parameters and you’re done). Unfortunately this is still at least a couple of months off though before it is even in Beta.

/Mauritz


#3

In the current Beta you can define an export template to export each result set into a separate worksheet of the same Excel file. That is not exactly what you are asking but may help as a work around.

Debbie


#4

Thanks to both of you for the quick answers!