Error - Only an ET or null statement is legal after a DDL Statement.

Connectivity
N/A

Error - Only an ET or null statement is legal after a DDL Statement.

I runtime combined 4 create table commands into a string. However, when i run this string as below in C#, 

cmd.CommandText = createTableCommands;
cmd.ExecuteNonQuery();

It failed with this error =  Only an ET or null statement is legal after a DDL Statement.

But if i get the commandText and run it seperately in Teradata SQL Assistance, then i am able to run that string successfully. May i know why? Thanks. 

Tags (1)
3 REPLIES
N/A

Re: Error - Only an ET or null statement is legal after a DDL Statement.

Anyone has any idea? :)

N/A

Re: Error - Only an ET or null statement is legal after a DDL Statement.

Each DDL statement must be commited individually.

But you try to submit four DDLs in a single string = multi statement request = single transaction.

Dieter

Teradata Employee

Re: Error - Only an ET or null statement is legal after a DDL Statement.

SQL Assistant executes each statement (separted by semicolon) separately.

SQL Assistant can execute Multi-Statements requests also. You must click/select "Execute Parrallel" which genertes the same error.