title: How can I copy records between tables only if they are valid according to check constraints in Firebird/Interbase?
body: <p>I want to copy a bunch of records from a temp table to a target table. The problem is that some records may violate check constraints in the target table so I want to insert everything that is possible and generate error logs somewhere else for the invalid records.</p>
  
  <p>If I execute:</p>
  
  <pre><code>INSERT INTO target_table
    SELECT ... FROM temp_table
  </code></pre>
  
  <p>nothing would be inserted if any record violates any constraint. I could make a loop and manually insert one by one, but I think the performance would be lower.</p>