How do I ignore errors generated from a duplicate index insert within a trigger
Posted on 2007-11-23
I have a legacy Adaptive Server Anywhere 6 database which i need to add a trigger to.
Within this trigger I need to add some data to a table but I dont care if the row already exists. I dont really want to do a "select 1 from..." to test it's presence as I feel this imposes an overhead on the database.
Is there any way I can simply trap the duplicate primary key index error and ignore it?