Query Editor (Reference) provides SQL script writing capabilities with syntax highlighting, auto-completion, and advanced text manipulation features. The Query Editor enables:
Access via double-clicking SqlStatement in Dataset Queries or through the dedicated editor button.
| Action | Shortcut | Description |
|---|---|---|
| Undo | Ctrl+Z | Revert last action |
| Redo | Ctrl+Y | Reapply undone action |
| Cut | Ctrl+X | Remove and copy to clipboard |
| Copy | Ctrl+C | Copy to clipboard |
| Paste | Ctrl+V | Insert from clipboard |
| Delete | Delete | Remove without copying |
| Select All | Ctrl+A | Highlight entire content |
| Action | Description |
|---|---|
| Cut/Append | Cut and append to existing clipboard |
| Copy/Append | Copy and append to existing clipboard |
| Insert Example | Insert predefined SQL template |
| Is Document Read-only | Check edit permissions |
| Function | Shortcut | Description |
|---|---|---|
| Find | Ctrl+F | Open search dialog |
| Find Next | F3 | Next occurrence |
| Incremental Search | Ctrl+I | Search while typing |
| Option | Purpose |
|---|---|
| Indicator Margin | Error/warning indicators |
| Line Number Margin | Line numbering display |
| Outlining Margin | Code folding controls |
| Ruler Margin | Horizontal ruler |
| Selection Margin | Click-to-select lines |
| Option | Purpose |
|---|---|
| Word Wrap | Wrap long lines |
| Word Wrap Glyphs | Show wrap indicators |
| Whitespace Visible | Display spaces/tabs |
| Indentation Guides | Vertical indent lines |
| Line Modification Marks | Show changed lines |
| Option | Purpose |
|---|---|
| Current Line Highlighting | Highlight cursor line |
| Delimiter Highlighting | Match brackets/parentheses |
| Search Result Highlighting | Highlight found text |
| Option | Purpose |
|---|---|
| Can Scroll Past Document End | Allow scrolling beyond text |
| Virtual Space at Line End | Cursor beyond line end |
| Auto-Correct Enabled | Automatic corrections |
| Toggle Token Info in Status Bar | SQL token information |
| Operation | Description |
|---|---|
| Convert Tabs to Spaces | Replace tabs with spaces |
| Convert Spaces to Tabs | Replace spaces with tabs |
| Tabify Selected Lines | Leading spaces to tabs |
| Untabify Selected Lines | Leading tabs to spaces |
| Delete Horizontal Whitespace | Remove inline spaces |
| Trim All Trailing Whitespace | Clean all line endings |
| Trim Trailing Whitespace | Clean selected lines |
| Delete Blank Lines | Remove empty lines |
| Operation | Description |
|---|---|
| Make Uppercase | Convert to UPPER |
| Make Lowercase | Convert to lower |
| Toggle Character Casing | Switch case |
| Capitalize | First Letter Caps |
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}})| Shortcut | Action |
|---|---|
| Home | Line start |
| End | Line end |
| Ctrl+Home | Document start |
| Ctrl+End | Document end |
| Ctrl+G | Go to line |
| Shortcut | Action |
|---|---|
| Shift+Arrow | Extend selection |
| Ctrl+Shift+Arrow | Word selection |
| Shift+Home/End | Line selection |
| Ctrl+L | Select line |
| Shortcut | Action |
|---|---|
| Tab | Indent |
| Shift+Tab | Outdent |
| Ctrl+] | Increase indent |
| Ctrl+[ | Decrease indent |