community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Ideas

Share your Designer product ideas - we're listening!
#SANTALYTICS

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

Treat Tab character as white space in SQL Editor

We regularly copy and paste SQL code from MS SQL Server Management Studio into the SQL Editor in the Input Data tool in Alteryx Designer. We normally format our code using tabs for indentation to make it clear and easier to read. However, these tabs trigger an error similar to: "Error opening table: Microsoft SQL Server Native Client 11.0: Incorrect syntax near 'FROM'.\42000 = 102".

 

This code runs perfectly in Managment Studio. When I delete the tabs, the code works, but is much more difficult to read. It is generally standard in SQL editors that tab characters are considered "white space," along with spaces and CRLF.

 

Please allow tabs in the SQL Editor.

 

4 Comments
Comet

I recently learned that the error is triggered only by a tab preceding the "FROM" clause in the SELECT statement. Tabs before other lines, like JOIN, WHERE, etc., don't seem to be a problem.

Alteryx Certified Partner

 +1 

@DawsonM

Alteryx
Alteryx

Can you give examples of queries that fail in Alteryx due to tab characters, including the new lines and tab characters in the queries?

Comet

As I said nearly 3 years ago: "a tab preceding the "FROM" clause in the SELECT statement"

e.g.:

SELECT *
<tab>FROM anydatabase.[dbo].anytable

 

My workaround has been to change SSMS options to convert tabs to spaces.