![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 11 Nov 2008 @ 21:23:09 GMT
The error most commonly occurs if you are performing DDL and DML in a single multi-statement request. For example if you have something like this:
String sql = "create table a (i1 integer); insert into a values (1);";
statement.execute (sql);
You need to do this in two steps. First the create (DDL) then the insert (DML). You will get the same error if you did the create followed by a select and there are a number of other variations that can cause the error. For example:
String sql = "create table a (i1 integer);";
statement.executeUpdate (sql);
...
sql = "insert into a values (1);";
statement.executeUpdate (sql);
Note that you can batch up the DML statements if you like, although that isn't the best way to get data into the table. Example:
sql = "insert into a values (1); insert into a values (2); insert into a";
I hope this helps Glenn Mc
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||