Generate data insert statement

Hello,

Is there a way to have Toad auto generate a data insert statement? Here’s an example:

Table Users
PK,FirstName,LastName,FavSaying
1,‘John’,‘Smith’,‘Today is the day!’
2,‘Jane’,‘Brown’,‘Carpe diem’
3,‘Mark’,‘Johnson’,‘Just do it!’

So, looking at above table in Toad, I would like to select a row (or rows) and right click with the menu option to generate a data insert statement. Upon doing so, the following is put in an editor or the clipboard:

insert into Users values (FirstName,LastName,FavSaying) values (‘Jane’,‘Brown’,‘Carpe diem’)

If have two or more rows selected, it generates:

insert into Users values (FirstName,LastName,FavSaying)
select ‘Jane’,‘Brown’,‘Carpe diem’
union
select ‘Mark’,‘Johnson’,‘Just do it!’

Does Toad have such a tool? I looked for in 5.7 but no luck. I found something similar with the Export feature but it does a full select from the table. I just need the data with no reference to the source table.

Thanks,
Matt

Hello Matt,
there are several ways to export data from toad. Not sure it is exactly what you are looking for.

  1. Export Wizard - Export to SQL File
  2. Generate Data Script dialog (call from database node)
  3. Copy data directly from data tab

See attached document from me with screes for each method.

Alex
Export_data.docx (257 KB)

Alex,

Great… Very useful! I appreciate the examples.

Thank you!
Matt

Hello,

The SQL script output format is not an available format (I only get comma separated values, fixed column width, tab delimited text, delimited text, XML data, Excel). As a consequence I cannot generate insert data staement.

Can anyone help ?

Thank you

I am running the 6.5.0.3282 version.

Hi,

Thank you very much for your feedback. Toad For SQL Server Freeware version not support this functionality. Would you like try to down load the beta version generate the Insert statement?

Best Regards,

Kelly