Toad World® Forums

enhancement request...add 'APPEND' option when Exporting Dataset to a file


#1

Add an ‘Append’ option when Exporting Dataset to a file, so it is
possible to export a batch of insert statements for various tables and
append them into one file. Currently, I run a script of 10+ sql
statements that prompts for a value in the where clause. Then Export
the data from each grid as insert statements onto the clipboard and
paste them one at a time into the editor to run. Or if you could make
the queries in ‘Copy Data to another Schema’ prompt for &&parameters,
that would work too… :slight_smile:


#2

The “copy data to another schema” functionality does have the
ability to specify a where clause on each table. Will that solve your problem?


#3

Good idea about the Append To File option on Export Dataset.

For your specific situation, you could also try combining the queries
into one UNION:

Select ‘insert into x(columnlist) values (’’’ || col1 || ‘’’,’’’
);’ cmd
from x
where
union all
Select ‘insert into y(columnlist) values (’ || col1 || ‘,’’’ );’
cmd
from y
where
union all

Then you just get one data grid, and one export/paste, instead of ten.

Nate Schroeder
IT Commercial Technical Services - Data Management Team
Monsanto Company
800 N. Lindbergh Blvd. G3WI - Saint Louis, MO - 63167
314-694-2592