DBeaver – Generate SQL Insert Statements from Data

Script SQL Insert Statement from Data

Using SQL Server Management Studio ( SSMS), I entered quite a bit of data into a new table.

Not wanting to ever repeat that arduous process, I sought out tools that will allow me to script out the data.

 

Script Data

Yes, BCP will work, but I will be scripting out the data and will not be getting the SQL Statements.

 

Script SQL

DBeaver

Download and Install

Downloaded and Installed DBeaver.

BTW, here is the link.

Launched App

Installed Microsoft SQL Server JDBC Driver

Using built-in tooling added Microsoft’s SQL Server JDBC Driver.

Enter SQL

In DBeaver, launched new “SQL Editor”.

Entered the Query:


SELECT RoleID, RoleName

FROM   dbo.listofServerRoles tblSR

 

Result

Capture SQL

To capture the SQL, select all the records you will like scripted.

Then choose the menu items, “Generate SQL” and “Insert”.

Generated SQL

Shortcoming

There are some shortcomings in DBeaver’s implementation.

I will cover the shortcomings and workarounds in a later post.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s