I runtime combined 4 create table commands into a string. However, when i run this string as below in C#,
cmd.CommandText = createTableCommands;
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.
Each DDL statement must be commited individually.
But you try to submit four DDLs in a single string = multi statement request = single transaction.
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.