Extracting query results as INSERT statements

Ivan C.

Member³
Could you please add the ability to extract the results of a SQL query (in SQL Window) as a series of INSERT statements?

This is very useful to port several records of data to another DB.
 
Ivan,

I bet the basics of this could be done simply with a Special Copy. But you'd have to paste in the Insert column names yourself.

Yeah it'd be really cool if they built this into Developer, but you can at least get the basics by creating your own Special Copy.

I'd think they'd have to prompt for the table name anyway to get the column names. But you can get that from Describe already. Then just Find and Replace them into your INSERTs.

Best of luck,

Stew
 
I don't understand what do you mean by Special Copy (maybe because I never used it before and don't know how it works).

In any case, imagine how many times I'd need to add the INSERT INTO clause with the list of columns if I have a big result from my query. PL/SQL Developer already knows the columns selected (because it already has them as headers), and knows the source table (given that the query was run against one table).

I got used to this feature (Extract as INSERTs) while using Quest
 
Currently the only way to extract data as insert statements is by using the "Export Tables" tool. You can add a where clause to limit the result set.
 
Back
Top