Subject | Re: [firebird-support] Major stumbling block: Lack of multiple-row insert capability |
---|---|
Author | Ivan Prenosil |
Post date | 2007-01-23T17:04:24Z |
> Does Firebird have the ability to process multiple statements per query?e.g.
> Is there any other technique where the entire data can be sent in
> large batches?
EXECUTE BLOCK AS BEGIN
INSERT INTO TABLE1(col1,col2) VALUES(1,2);
INSERT INTO TABLE1(col1,col2) VALUES(3,4);
...
END
or using prepared statement
EXECUTE BLOCK (c11 INTEGER=?, c12 INTEGER=?, c21 INTEGER=?, c22 INTEGER=? ...) AS BEGIN
INSERT INTO TABLE1(col1,col2) VALUES(:c11,:c12);
INSERT INTO TABLE1(col1,col2) VALUES(:c21,:c22);
...
END
Ivan
http://www.volny.cz/iprenosil/interbase/