Edit-DB Edit-DB
(c) Nigel Maddocks, 2007
Edit-DB ver 2.05.016, Doc ver 2.05.016

3.5. Multiple-record Copying

* Also applies to copying from Views

* Please use this functionality with caution - particularly when copying to the SAME table.

Multiple-record copying is accessed through an interface activated after pressing the Multi Copy button button.

You are presented with the From Table definition and the To Table definition which will initially be blank.

Multi Copy From and To Table

Use the Select button next to the To Table, to select the table to copy to from a pop-up window. You may want to select a table from the same database, or different database, and/or a different database type, and/or a different database server - for which you may need to use the Re-login button to select the To-Database.

Multi Copy Select Table

If you want to create a new table to copy into, see Creating a New Table.

Having selected the To Table, (in this example the Employee table has been used as a basis for a new table called Employee_copy) you can now define which tables should be copied into, e.g. it might be better not to copy into auto-increment columns, and you can define what data to copy into the To Table columns.

Enter either : Multi Copy Column Data

If you are new to this functionality or you want to see the generated SQL statements before having them applied to the database, check the Script-only check-box. If this is checked then pressing the Start Copy button will provide a link from where the SQL statements are displayed. To return to the original table, click on the table name in the Tables list or the Recent tables sub-list.

If the Script-only check-box is not checked, then on pressing the Start Copy button, SQL statments are generated to perform the copy, and then applied to the database, and committed. Copies into Oracle tables are slightly different in that all the SQL statements are applied as a transactional block which is completely rolled-back if any statements fail.

The generated SQL is portable, and can be stored to a file and used to re-create table data at a later date or on another server.



3.5.1. Creating a New Table