Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!
The Product Idea boards have gotten an update to better integrate them within our Product team's idea cycle! However this update does have a few unique behaviors, if you have any questions about them check out our FAQ.

Alteryx Designer Desktop Ideas

Share your Designer Desktop product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

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.

 

6 Comments
blyons
11 - Bolide

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.

NickDuncan
7 - Meteor

 +1 

@DawsonM

jpoz
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?

blyons
11 - Bolide

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.

 

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Status changed to: Accepting Votes
 
pfiskrat
7 - Meteor

Today I wasted hours trying to resolve this issue. How has this not been fixed yet? 

The error message changes depending on which driver is used - I guess others with this issue weren't able to stumble upon this thread without first identifying that the TAB character was the issue.

 

With ODBC driver: {ODBC Driver 13 for SQL Server}
The error message was: Error opening "SELECT * FROM ": No Columns Returned.