Subject | Re: [firebird-support] Insert statement |
---|---|
Author | Milan Babuskov |
Post date | 2011-02-14T12:57:40Z |
munster77054 wrote:
---------------------------------
execute block as begin
INSERT INTO ... VALUES (...);
when SQLCODE -803 do exit; end
---------------------------------
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================
> Because of one of my domains, I've become FAMILIAR with MySQL. Within this, it has an "INSERT IGNORE" in addition to the standard "INSERT" statement. This command instructs the database engine to attempt the insert, and if it fails, just to continue on to the next INSERT statement. This works well if the record is a duplicate based on the Primary Key, for instance.You can use EXECUTE BLOCK and ignore the duplicate key error (-803):
>
> I've looked and looked, but can't find an equivalent statement for FIREBIRD (2.1.x)
---------------------------------
execute block as begin
INSERT INTO ... VALUES (...);
when SQLCODE -803 do exit; end
---------------------------------
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================