All Forums Database
jeevanrag 1 post Joined 04/09
15 Apr 2009
Only an ET or null statement is legal after a DDL Statement

Iam trying to execute the following following webfocus code using teradata SQL pass thruENGINE SQLDBC SET DEFAULT_CONNECTION &&IBCTDCONTSQL SQLDBCCREATE VOLATILE MULTISET TABLE KPIMMT(PERIOD INTEGER,CR_BAND VARCHAR(20),P_F INTEGER,P_M INTEGER,C_F INTEGER,C_M INTEGER)ON COMMIT PRESERVE ROWS;END-RUNSQL SQLDBCINSERT INTO KPIMMT VALUES(1,'A',1,1,1,1);END-RUNbut am facing the following error(FOC1400) SQLCODE IS -3932 (HEX: FFFFF0A4) : [25000] [NCR][ODBC Teradata][Teradata Database] Only an ET or null state : ment is legal after a DDL Statement.Unable to get catalog string. (FOC1414) EXECUTE IMMEDIATE ERRORHow should the SQL be restructured to insert an ET or null statement after the create volatile statement??Any assistance is highly appreciated

Jim Chapman 449 posts Joined 09/04
15 Apr 2009

Evidently, Webfocus is using ODBC in "manual commit mode". This mode expects the application to call a certain ODBC function (SQLTransact, if memory serves) to commit the transaction, and the Teradata ODBC driver will then generate the "ET" to the Teradata server. You'll need to find out from the Webfocus documentation how it do a transaction commit with its SQL passthru mode.

koteswararao 3 posts Joined 04/12
18 Apr 2012

Hi,

Teradata session is available in two modes

1) BTET (Begin transaction, End transaction)
2) ANSI

BTET is implicit commit mode that is it doesn't require an explicit commit to commit the changes to the DB and ANSI is explicit commit mode.

Solutions

1) Please check the mode you are using it should be BTET
2) You could also try putting in a NULL statement in between the DDL and the DML by putting in an empty ; or key in an explicit 'ET' statement.

KK

You must sign in to leave a comment.