All Forums Connectivity
bedum 2 posts Joined 09/12
01 Oct 2012
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. 

bedum 2 posts Joined 09/12
01 Oct 2012

Anyone has any idea? :)

dnoeth 4628 posts Joined 11/04
01 Oct 2012

Each DDL statement must be commited individually.
But you try to submit four DDLs in a single string = multi statement request = single transaction.
Dieter

Dieter

NetFx 346 posts Joined 09/06
03 Oct 2012

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.
 

You must sign in to leave a comment.