Formatting a Query - SQL Assistant

Teradata SQL Assistant for Microsoft Windows User Guide

Product
SQL Assistant
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2430
lifecycle
previous
Product Category
Teradata Tools and Utilities

Formatting a Query

The query formatting feature adds line breaks and indentation before certain keywords, making SQL that comes from automatic code generators or other sources more readable.

To format a query

1 Ensure a statement exists in the Query Window.

2 Do one of the following:

  • On the toolbar, click .
  • Right-click in the Query Window, then click Format Query
  • Press Ctrl+Q
  • Select Edit > Format Query
  • Note: Some keywords cause a line break and possibly cause the new line to be indented. If a keyword is found to already be the first word on a line and it is already prefixed by a tab character, its indentation level does not change.

  • Indentation
  • Language Definition Files