How to generate Script As from the results grid

Query Builder allows generating scripts from the results grid based on the selected table data with the following statements: INSERT, WHERE IN(), WHERE AND OR, and UPDATE.

To generate Script As from the results grid:

1. In the results grid, select the data for which you want to generate a script. There are two ways to do it:

  • Move the mouse pointer across the grid holding the left mouse button.

  • Click the first cell of the required data range, press the SHIFT key, hold it and click the last cell. A rectangular range of cells will be selected. Using the CTRL key, you can include/exclude cells from selection.

  • Alternatively, you can select any required cells by clicking them while holding CTRL, and then invoke Generate Script As. The output will include data from all rows and columns that are represented in the selection.

2. Open the shortcut menu and go to Generate Script As, then select the required statement type, and then choose whether the output should be opened in a new window, copied to clipboard, or saved to a file.

Invoke Generate Script As

Let’s see how it’s done. First we select the required data.

Generate Script As

Now we are ready to generate Script As from the results grid.

This is how it works for the INSERT statement:

Generate Script As - INSERT

This is how it works for the WHERE IN() statement:

Generate Script As - WHERE IN

It is convenient to specify the required condition by inserting the copied WHERE statement into a previously created SELECT * FROM query.

This is how it works for the WHERE AND OR statement:

Generate Script As - WHERE AND OR

It is convenient to specify the required condition by inserting the copied WHERE statement into a previously created SELECT * FROM query.

This is how it works for the UPDATE statement:

Generate Script As - UPDATE

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Query Builder for SQL Server.
Request a demo

Request a demo

If you consider employing the Query Builder for your business, request a demo to see it in action.
Ready to start using dbForge Query Builder for SQL Server?