cancel
Showing results for 
Search instead for 
Did you mean: 

SQL syntax highlighting and formatting in SQL Editor

SQL syntax highlighting and formatting in SQL Editor

Message contains a hyperlink

The SQL Editor window could have a better presentation of the SQL code; two issues observed

  • First, that it's simply plain text without even a fixed-width font, much less syntax highlighting
  • Second, if you type in some manually formatted SQL code (e.g. with line feeds and indentation), then click on the "Visual Query Builder" button, then click back to the "SQL Editor" button, all the formatting is lost as it is converted to one run-on line of code, which is very difficult to read.

I understand that going between the Visual Query Builder and the SQL Editor is bound to have some issues; nonetheless the "idea" is to allow a user friendly display in the SQL Editor window:

My "implementation ideas" are based on a couple minutes with google, so hopefully this is a very feasible request; my user base is very likely to spend more time in the SQL editor than not, so this would be a valuable UX addition.  Thanks!

 

36 Comments

@jpoz  : Great news !! Thanks.

SeanAdams
17 - Castor

This would be fantastic - it's been a very commonly requested feature, and one that is sorely needed.

 

@jpoz- loads of us are willing to help with ideas or thoughts if you need help!

jpoz
Alteryx
Status changed to: Implemented

The SQL Editor window has been improved with the following functionality:

  • Fixed width font
  • Syntax highlighting of common SQL keywords
  • Your SQL statement is not lost when you switch tabs but do nothing else.
  • The generated SQL statement is indented initially rather than being output in one long string
  • If you highlight a brace it will highlight the matching brace

You can download the latest 2019.4 release (https://downloads.alteryx.com) to begin using this functionality.

JohnJPS
Aurora

Thank you! 

kgalbert
Comet

Hey @jpoz 

 

Thanks for implementing the new feature!  The color coding really helps me make SQL code changes in Alteryx instead of taking the code out to a separate tool with one exception.

 

When my code has longer statements I struggle with the fixed width of the window.  Is this something I can fix on my end or something that can be fixed with a future update?  See picture below.

 

Thanks,
Ken

 

SQL Example.jpg

jpoz
Alteryx

@kgalbert Thanks for mentioning this. The fix for this will be released soon in a future update.