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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

SQL error that I only get in Alteryx

Highlighted
Bolide

I run this in Teradata and out of Access as a pass through and it works fine.  I try it in Alteryx 11.3 and I get error.

 

Error SQLPrepare: [Teradata][ODBC Teradata Driver][Teradata Database] syntax error: expected something between the word 'field1,storehierarchy' and '.'.

 

 

Select

store_hierarchy.field1,

store_hierarchy.field2,

 

.......  more code  ........

 

group by 1,2,3,4

 

 

 

 

Alteryx Certified Partner

I've noticed that Alteryx doesn't always recognize linebreaks when writing SQL within the Input tool.  If you add a space after select and maybe in between the fields does it then work?  

Bolide

We would have never figured that out in a thousand years.  Thanks soo much.

Alteryx Partner

Ah spacing!

 

Yes, I copied and pasted a query from Teradata SQL Assistant (with the "Format Query" option on) and received the same error. Made sure there was a space after the Select, From, Where and it worked.

 

Meteor

Thanks a lot it helped me too. 

Thanks for your suggestion.

I had the same error, but I saved my query anyway while I went to search for the solution. When i came back to resolve the line breaks (having read your post), Alteryx sorted it out itself. I guess what happened was, when I closed the input tool having pasted my query into the SQL editor, Alteryx removed any formatting of the query (it all gets displayed as one line anyway). But the error message persisted nevertheless, until I went back into the 'edit query' mode, when I found that the SQL I pasted was now all displayed as one long string. I didn't change a thing, just clicked apply settings, and the error disappeared. It could have been designed better.

Labels