Query Editor (Reference) provides SQL script writing capabilities with syntax highlighting, auto-completion, and advanced text manipulation features. The Query Editor enables:

  • SQL syntax highlighting
  • Auto-completion support
  • Search and replace
  • Code formatting
  • Whitespace management
  • Visual customization

Access via double-clicking SqlStatement in Dataset Queries or through the dedicated editor button.


In this page:

Edit Actions

Basic Operations

ActionShortcutDescription
UndoCtrl+ZRevert last action
RedoCtrl+YReapply undone action
CutCtrl+XRemove and copy to clipboard
CopyCtrl+CCopy to clipboard
PasteCtrl+VInsert from clipboard
DeleteDeleteRemove without copying
Select AllCtrl+AHighlight entire content

Advanced Operations

ActionDescription
Cut/AppendCut and append to existing clipboard
Copy/AppendCopy and append to existing clipboard
Insert ExampleInsert predefined SQL template
Is Document Read-onlyCheck edit permissions

Search Functions

FunctionShortcutDescription
FindCtrl+FOpen search dialog
Find NextF3Next occurrence
Incremental SearchCtrl+ISearch while typing

View Options

Margin Controls

OptionPurpose
Indicator MarginError/warning indicators
Line Number MarginLine numbering display
Outlining MarginCode folding controls
Ruler MarginHorizontal ruler
Selection MarginClick-to-select lines

Display Settings

OptionPurpose
Word WrapWrap long lines
Word Wrap GlyphsShow wrap indicators
Whitespace VisibleDisplay spaces/tabs
Indentation GuidesVertical indent lines
Line Modification MarksShow changed lines

Highlighting Options

OptionPurpose
Current Line HighlightingHighlight cursor line
Delimiter HighlightingMatch brackets/parentheses
Search Result HighlightingHighlight found text

Navigation Settings

OptionPurpose
Can Scroll Past Document EndAllow scrolling beyond text
Virtual Space at Line EndCursor beyond line end
Auto-Correct EnabledAutomatic corrections
Toggle Token Info in Status BarSQL token information

Advanced Options

Whitespace Management

OperationDescription
Convert Tabs to SpacesReplace tabs with spaces
Convert Spaces to TabsReplace spaces with tabs
Tabify Selected LinesLeading spaces to tabs
Untabify Selected LinesLeading tabs to spaces
Delete Horizontal WhitespaceRemove inline spaces
Trim All Trailing WhitespaceClean all line endings
Trim Trailing WhitespaceClean selected lines
Delete Blank LinesRemove empty lines

Text Transformation

OperationDescription
Make UppercaseConvert to UPPER
Make LowercaseConvert to lower
Toggle Character CasingSwitch case
CapitalizeFirst Letter Caps

SQL Features

Syntax Highlighting

  • Keywords (SELECT, FROM, WHERE)
  • Functions (COUNT, SUM, AVG)
  • Strings and numbers
  • Comments (-- and /* */)
  • Tag placeholders {{Tag.Name}}

Auto-Completion

  • SQL keywords
  • Table names
  • Column names
  • Function names
  • Tag references

Code Templates

Common SQL patterns:

sql

-- Basic SELECT
SELECT * FROM TableName WHERE Condition

-- JOIN template
SELECT t1.*, t2.*
FROM Table1 t1
INNER JOIN Table2 t2 ON t1.ID = t2.ID

-- INSERT with tags
INSERT INTO TableName (Col1, Col2)
VALUES ({{Tag.Value1}}, {{Tag.Value2}})

Keyboard Shortcuts

Navigation

ShortcutAction
HomeLine start
EndLine end
Ctrl+HomeDocument start
Ctrl+EndDocument end
Ctrl+GGo to line

Selection

ShortcutAction
Shift+ArrowExtend selection
Ctrl+Shift+ArrowWord selection
Shift+Home/EndLine selection
Ctrl+LSelect line

Editing

ShortcutAction
TabIndent
Shift+TabOutdent
Ctrl+]Increase indent
Ctrl+[Decrease indent

Best Practices Checklist 

  • Enable line numbers - Easy reference
  • Show whitespace - Spot formatting issues
  • Use delimiter highlighting - Match parentheses
  • Enable word wrap - Long queries visible
  • Regular formatting - Consistent indentation
  • Trim whitespace - Clean code
  • Use templates - Standard patterns

Tips and Tricks

Efficient Editing

  • Use incremental search for quick navigation
  • Cut/Append for building complex queries
  • Multi-line selection with Alt+drag

Code Organization

  • Fold complex subqueries
  • Use consistent indentation
  • Comment complex logic
  • Group related statements

Performance

  • Highlight slow query patterns
  • Use execution plan preview
  • Monitor token complexity

In this section...



  • No labels