copy row from one table to another

bmayfield

Member²
Is there a way to export a row from one table (production) and import it to another table (development). The need is for regression testing. I don't think the copy function is supported as it is in Oracle SQL*PLUS Release 8.0.6. This is what we need to do:

1 copy from wcc/prodpsw@prod -
2 to wcc/devpsw@dev -
3 insert claims -
4 using -
5 select * -
6 from claims -
7 where AGENCY_CLAIM_NUMBER IN -
8* (100366145)
 
Hi,

you can export as sql-insert directly from the resultset. There is an button export-query-results. Then use sql.

Or you use the export/import-Table tool. There you can export an(y) hole table(s), but also with an optional where clause.

 
In case you're really talking about a single row, you can also copy/paste directly from the grid.

1. Log to source db
2. Select rowid, a.* from my_table a;
3. Mouse-select the line (by clicking its far left grey marker)
4. Right-click and copy
5. Log to target db
6. Run the same query as in step 2
7. Press the "insert record" button in the grid's toolbar
8. Type something in one of the fields in order to enable paste (I think it is a bug, usually it is not immediately available)
9. Mouse-select the line, right-click and paste.
10. Press "post changes" button
11. commit;

It works like a charm.

Regards,
Gustavo

 
Back
Top