Any simple way of only inserting a record if it doesn't already exist?
Created by: mowings
I tried to use a unique index that describes the keys that make a record distinct, but unless I abort the transaction (which I don't want to do because this is a bulk insert, and I'd lose 100s of good inserts), the row still gets inserted -- even though ql reports the unique index error. I'm not sure if this is a bug or not -- I would think that if the insert returned an error, then the row insert would fail -- but it does not.
I tried querying prior to the insert, but this massively slows things down. Any suggestions?
Thanks very much