Subject | Re: insert multiple rows |
---|---|
Author | betoban2007 |
Post date | 2007-12-12T14:09:26Z |
OK, thank man
--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy
<rrokytskyy@...> wrote:
--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy
<rrokytskyy@...> wrote:
>firebird?
> Sorry for late reply...
>
> > Does somebody know as inserting multiple registrations in
> > and attempted the following thing but it generates me error:val13);
> > 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,
> INSERT INTO tbl_x(col1, col2, col3) VALUES(' val11 ', ' val1'2,val13);
> /* ...and so on */compiled
> END
>
> Note, the size of the SQL statement is limited by 64k or 32k in
> form (the smaller applies).
>
> Roman
>