DBeaver – Generating SQL from existing data

Background

A good man reached out to me and prepped me about an upcoming Change Request.

The Change will be to add a lone record.

Options

Here are a couple of options:

  1. Have him add it to Development / QA
    • I will use Linked Server to bring it over to Production
    • Create corresponding SQL Statements and apply generated SQL

 

Generated SQL

Dbeaver

Outline

  1. Generate Data
    • Object
    • SQL Query
  2. Review Data Pane
  3. Select Data Rows
  4. Using menu, access “Generate SQL”\”Insert”

 

Generate Data

Depending on your needs, choose to generate data against the selected table or view. Or write a custom SQL.

Object

If it will expedite your needs, please choose a table, view, function, or Stored Procedure.

When table or view, please right click on the selected object and choose “Edit data”.

SQL Query

Enter SQL Query

SQL Query – Text

select *
from WideWorldImportersDW.Dimension.City

SQL Query – Image

paneQuery.20181102.0758AM

Execute Query.

Review Data Pane

Here is Generated data

paneData.20181102.0757AM.PNG

Data Pane – Select Data Rows

In the Data Pane, please select the data rows.

 

Data Pane, Generate SQL/Insert

Right click on the selected records and choose to generate SQL/Insert.

Generated SQL

WideWorldImportersDW.Dimension.City

paneData.Insert.Dimension.City.20181102.0807AM

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