Issue
When connecting to Teradata Database via ODBC to pull data into the Input Data tool Syntax errors like the followings occur:
Error SQLPrepare: [Teradata][ODBC Teradata Driver][Teradata Database] (-3706) Syntax error: expected something between an integer and the integer '7'.
Error SQLPrepare: [Teradata][ODBC Teradata Driver][Teradata Database] syntax error: expected something between the word 'field1,storehierarchy' and '.'.
Environment Details
- Alteryx Designer
- ODBC Teradata Driver
Cause
There was a 'LinenBreak' /‘Line Feed’ on the query.
Diagnosis
The query runs fine outside Designer.
Resolution
Copy the query into Notepad++. Remove all line breaks and extra spaces from the query and make sure there is a space after the words Select, From, Where, Case, When, Then, Else, Like, And, End, As, etc. Then paste the SQL query in the SQL Editor tab.