Aqua Data Studio provides an SQL Formatter which is accessible from the Query Analyzer.

With the keystroke (CTRL+B) the user may format an SQL statement according to a set of options. By default, the editor will prompt the user with a dialog of options for formatting. Application-level settings for the formatter are located in File > Options > Formatter. In the options section, a user may specify for the formatter to format SQL without prompting the user. The user may also format all SQL statements in a script with one keystroke (CTRL+SHIFT+B).

Its options include:

General

  • Show Options Dialog - Whether the Options Dialog will be shown before formatting

Line Break

  • Before Comma - Adds a line break before the comma
  • After Comma - Adds a line break after the comma
  • Before Logical Operators - Adds a line break before logical operators (e.g. AND, OR)
  • After Logical Operators - Adds a line break before logical operators (e.g. AND, OR)
  • After SQL Keywords - Adds a line break after SQL keywords (e.g. SELECT, FROM, WHERE)
  • Break for CASE Keywords - Adds line breaks for CASE keywords (i.e. CASE, WHEN, THEN, ELSE, END)
  • Break for Brackets - Adds line breaks for brackets in AND, OR, and WHEN
  • Wrap Line - Wraps line automatically
  • Line Wrap Column - The maximum column before the line wraps

Uppercase

  • SQL Keywords - Turns SQL keywords uppercase
  • Full SQL - Turns the full SQL statement uppercase

Indentation

  • Number of spaces per Tab - Number of spaces to expand in a TAB if Tabs are used for indentation
  • Use Tabs for Indentation - Determines whether a real TAB is used or whether a TAB is expanded to spaces
  • Alignment on Operators - Alignment on =, , > and AS
  • Alignment on JOIN - Alignment on table joins
  • No labels