PDA

View Full Version : creating a trigger


havey
05-20-2005, 07:49 PM
Hi, i'm a newbie... how an a insert trigger on the table that checks the info before it actuly inserts, be created? also the triggers check if there is aduplicate record and if so drop it and if not, insert it.

Actuall i'm not sure if this is the best thing to do in my situation. I'm parsing info from a web page, and putting it in a sql db. This happens every second with about 80 records, 60% of them (sometimes) are dups. I want to remove the dups from the table, the table contains 200,000 records right now, with a lot of dups, i would like to know how best to upkeep the table without dups and to have this process automated somehow. The db is inHouse.

thanks

Kiwi
05-21-2005, 12:54 AM
It would be easier to create a unique index on the field/fields you don't want duplicated.