Subject Re: insert multiple rows
Author betoban2007
OK, thank man





--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy
<rrokytskyy@...> wrote:
>
> Sorry for late reply...
>
> > Does somebody know as inserting multiple registrations in
firebird?
> > and attempted the following thing but it generates me error:
> > INSERT INTO tbl_x (col1, col2, col3)
> > VALUE ((' val11 ', ' val1'2, val13),
> > (' val11 ', ' val1'2, val13),
> > (' val11 ', ' val1'2, val13));
>
> Firebird does not support such syntax. The closest solution is:
>
> EXECUTE BLOCK AS BEGIN
> INSERT INTO tbl_x(col1, col2, col3) VALUES(' val11 ', ' val1'2,
val13);
> INSERT INTO tbl_x(col1, col2, col3) VALUES(' val11 ', ' val1'2,
val13);
> /* ...and so on */
> END
>
> Note, the size of the SQL statement is limited by 64k or 32k in
compiled
> form (the smaller applies).
>
> Roman
>