You can change the font used in the text box with Edit > Change Font
You can change the case of the selected text with Edit > Change Case
You can right-click the text-box to get a drop-down list of the Edit menu items.
You can Comment or Un-Comment a block of text with Edit > Comment Text and Edit > UnComment Text, or the Comment/UnComment icons.
You can Find and Replace text with Edit > Find and Edit > Replace, or use the Find icon.
You can add or remove entries from the Keywords and Operators listboxes. This is useful if there is an SQL keyword or phrase you use frequently. The keywords are held in file sqlkeywords.txt (in your AQT directory). You can edit this file to change the entries that appear in the listboxes.
You can edit this file by right-clicking the listbox and selecting Edit Keywords. If you have changed the keywords outside the control of AQT, Reload Keywords will reload the listboxes from the keywords file.
You can have line numbers on your text by selecting View > Line Numbers
You can specify whether text is wrapped with View > Line Wrap (Ctrl+W).
The edit control supports the use of bookmarks. This makes it easy to find your way around a large script.
You can switch your editor into Right to Left mode by selecting Edit > Right-to-Left mode.
The following keys are useful to move through your SQL.
This function is useful if your SQL has many indented levels of brackets. Position the cursor at a bracket and hit Edit > Find Matching Bracket (or F12)
Edit > Select within brackets (or F11), will select the text between the brackets containing the cursor. This can be useful for selecting and running a sub-select.
You can use Export > Export to SQL Window to send the query result back to the SQL Window. This is useful if you are running an SQL statement that is generating SQL statements.
You can format an SQL statement by clicking on Edit > Format SQL. This will reformat your SQL in a layout which is more easily read.
Insert statements will be formatted in a way which makes it easy to match the insert-value with the column being inserted; if the insert statement has a column list, the column name will be given (preceded by the comment indicator --) to the right if the column value. This syntax may not be valid for many databases, for which the comment indicator can only be given at the start of a line. However such insert statements will run OK within AQT as long as Options > Run SQL > Remove Comments from SQL is selected (by default it will be).
Both Format SQL and Unformat SQL will replace x'A0' characters with spaces. x'A0' is a "non-breaking space" that can appear in your SQL if you have pasted it from an email.
By default, the comma will be placed after the column name. To have it placed before the column name, specify Options > Run SQL > Format SQL places comma before column name.
You can unformat your SQL by clicking on Edit > Unformat SQL. This will remove all linebreaks and extra spaces from your SQL.
This will split your SQL into multiple lines, with each line a maximum of 60 characters.
This function may not work if you have text literals greater than 60 characters (AQT will not split these) or have text literals which span lines.
This is a more comprehensive reformat than Format SQL. AQT will "interpret" your SQL then rewrite it. The rules for how it will rewrite your SQL are specified in the Query Builder options.
This function can be used to:
This function works by importing the SQL into the Query Builder then generating the SQL from the Query Builder. The Query Builder can have difficulty with some complex queries, so this function can generate incorrect SQL in some cases. Use with a degree of caution.
This option is useful if you have pasted a query from an email or from Microsoft Word. In these cases, there can be invalid characters in the SQL that can prevent it from running. In addition Word can use special characters for start and end double-quote, which are also not valid in SQL.
Using Edit > Remove Invalid Characters will correct both these problems.
This option will copy your SQL text in rich-text format. This can then be used for pasting the SQL into Microsoft Word or similar editor; the colors and other text effects will be copied with the SQL.
Column Guides are vertical bar in the Run SQL window, and are useful for lining text up in a particular column positions.
The positions of the Column Guides is specified in Options > Syntax Highlighting.
You can make the text smaller / bigger with Editor > Zoom in/out, or Ctrl + Up/Down.
The default Line Spacing is given in Options > Syntax Highlighting > Line Spacing.
Alternatively you can change it in an SQL window with Editor > Increase/Decrease Line Spacing or Alt + Up/Down.
You can use Block Selection with Editor > Use block selection. When this is specified, text in a rectangular area is selected.
You can display Visual Where for your query with View > Visual Where (Ctrl+Shift+W). This displays your query in a visual format, which makes it easier to understand.