Actually, I take care of this in a different way:
UPDATE... WHERE...
If @@ROWCOUNT = 0
INSERT....
>>You can't do it in one instruction. Here's my perfered method:
>>
>>if exists (select * from mytable where keyfield=keyvalue)
>> update ...
>>else
>> insert
>>
>>-Mike
>
>Thanks Mike.
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell