Formatting options

To access formatting options, in the Tools menu select Options. In the Options window that opens, navigate to Formatting.

Options for SQL formatting window

As you can see general formatting options are grouped into three categories.

Formatting

Here you can select how your code will be formatted: immediately on paste or after you add a delimiter to a completed statement.

The Right Margin option allows the user to specify the code line length in symbols.

Note

Right Margin is a base point for formatting rules applicable for different statements, for example, Wrap condition when the margin is exceeded and Single line when the margin is not exceeded.

Notifications

In the Notifications group of options, you can select to display syntax errors in the Output window and whether to show or not the syntax error notification window.

Note

Some functionalities are disabled and available in dbForge Studio only.

Formatting Profiles

Formatting profile comprises a set of rules for how to layout your SQL. In order to configure formatting options or rules, do the following:

  1. In the Tools menu, click Options.
  2. In the Options window, go to Formatting > Profiles.
  3. Choose one of the predefined formatting profiles or create a new one.
  4. Click the Open Selected button.
  5. Edit formatting options in the left-hand pane.
  6. Click the Save As button.
  7. Click OK.

Here, you will find the list of predefined formatting profiles, as well as the ways to customize them.

Every formatting profile has a number of rules.

Formatting profiles

Options are grouped mainly by the statement. Each group has a set of such options as Line Breaks, Indentation, and Insert Spaces.

Changes in the default state of options and their influence on statement formatting can be viewed on the right-hand pane Formatting preview.

Search for statements or options can be conducted via the option search box.

Formatting search

Text options

Text options allow the user to indicate the Tab size and the Indent size in symbols. Here you can also select to Keep tabs and Insert Spaces, as well as specify the Right margin.

Tab size specifies the width of a tab character in whitespaces.

Indent size defines how many whitespaces will be put in the indented line start.

The indentation is performed with tabs or spaces depending on which option is selected - Keep tabs or Insert Spaces.

To hide/show the Text options pane, click the gear-wheel icon in the menu of the Edit Formatting Profile window.

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?