|Re: [firebird-support] can i ignore invalid record during an insertion?
> exists a way to ignore the insertion of an invalid row?Firebird can't ignore operations it is asked to perform, but you can
> for example if i have a not-null constraint on the id column
> when i make an INSERT with a null value as id i want that firebird will ignore that insert operation.
ignore errors it returns.
> i must do the insertion of a lot of records with an higth percentage of invalid data so i think that if i can manage the exeception (that is ignoring the invalid record) at the database level it's better that managing that at application level.No difference.
> another stupid question about performance is that, when i must do a lot of insert (~1000) it's better to wrap them into an explicit single transaction or left the default implicit transaction management? (i don't need to rollback all if same insertion fails, every insert is indipendent)1) 1000 isn't "a lot". 100000 would be...
2) Firebird don't have such things as "implicit transactions".
3) Inserting 1000 records in one transaction is faster than inserting
them in 1000 transactions.