I have a feeling that this is impossible, but here it goes ...
I have a table with an insert trigger. When data is inserted into this table, the trigger starts and parses the long varbinary columns. This trigger performs some operations on binary data and writes several records to the second table.
What I recently discovered is that sometimes binary data is not “correct” (that is, it does not match the specification that it should be for), I have no control over this at all), and this may lead to caste errors, etc.
My initial reaction was to wrap things in TRY / CATCH blocks, but it doesn't seem to be a solution either, since doing CATCH means the transaction is doomed, and I get the error message “Operation destined to trigger”.
What is needed is that the data is still written to the initial table. I don't care if the data is written to the second table or not.
I am not sure if I can do this or not, and I am gratefully receiving any advice.
sql triggers transactions
Valerion
source share