Formatting a Query - Teradata SQL Assistant

Teradata® SQL Assistant for Windows User Guide

Product
Teradata SQL Assistant
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2020-01-03
dita:mapPath
gfk1537201040714.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2430
Product Category
Teradata Tools and Utilities

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. Formatting also indents derived tables. If nested derived tables are used, the indentation level will be increased for each nested level.

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.
  1. Make sure a statement exists in the Query window.
  2. Optionally, select part of the query. If no text is selected, the entire query will be formatted.
  3. Do one of the following:
    • Click .
    • Right-click in the Query window, then select Format Query.
    • Press Ctrl+Q.
    • Select Edit > Format Query.