Alteryx Designer Desktop Discussions

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

Output Tool: Post Create SQL Statement Syntax Error

df
8 - Asteroid

Hello,

 

i have this post create SQL Statement.

df_0-1600757868434.png

 

i get this two errors:

 

Error: Output Data (35): Executing PostSQL: "ALTER TABLE 'Schema.Table' ADD PRIMARY KEY(TESTID);" : [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.31-0ubuntu0.18.04.1]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Schema.Table' ADD PRIMARY KEY(TESTID)' at line 1

 

Error: Output Data (35): Error running PostSQL on "Schema.Table": [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.31-0ubuntu0.18.04.1]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Schema.Table' ADD PRIMARY KEY(TESTID)' at line 1

 

But when i copy the same line into my mysql client it works just fine and the column is defined as primay key.

 

 

Can somebody help me?

Best regards,
David

1 REPLY 1
df
8 - Asteroid

Needs to be without the Single quotation marks:
ALTER TABLE Schema.Table ADD PRIMARY KEY (TESTID)

works

Labels