You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Lothar Krenzien <lk...@web.de> on 2011/06/16 20:03:23 UTC
error executing multiple insert statements
Hello,
I'd like to execute multiple insert statements over JDBC at once, but can't get it work ;(
Here a small demo:
...
insert into POSITIONTEMPLATE
(ID,VERSION,NAME,PRINT)
values
(NEXT VALUE FOR unique_id,0,'abc',1);
insert into POSITIONTEMPLATE
(ID,VERSION,NAME,PRINT)
values
(NEXT VALUE FOR unique_id,0,'efg',0);
If I execute every statement at once it works fine but if I execute all statements at once I always get the following error:
Encountered ";" at line 4 column 9.
I know that it means that there is a problem with the ";" sign - but that can't be right or ?
Derby 10.8.1.2
Thank you
Re: error executing multiple insert statements
Posted by Peter Ondruška <pe...@kaibo.eu>.
Run this in ij. That is for running SQL scripts. Or execute each
statement (without ;) separately.
On Thu, Jun 16, 2011 at 8:03 PM, Lothar Krenzien <lk...@web.de> wrote:
> Hello,
>
> I'd like to execute multiple insert statements over JDBC at once, but can't get it work ;(
>
> Here a small demo:
>
> ...
>
> insert into POSITIONTEMPLATE
> (ID,VERSION,NAME,PRINT)
> values
> (NEXT VALUE FOR unique_id,0,'abc',1);
>
> insert into POSITIONTEMPLATE
> (ID,VERSION,NAME,PRINT)
> values
> (NEXT VALUE FOR unique_id,0,'efg',0);
>
>
> If I execute every statement at once it works fine but if I execute all statements at once I always get the following error:
>
> Encountered ";" at line 4 column 9.
>
> I know that it means that there is a problem with the ";" sign - but that can't be right or ?
> Derby 10.8.1.2
>
> Thank you
>