>So I could use a cursor?
While you could use a cursor, it would not be recommended. Remember that the trigger will be called for each INSERT and UPDATE against the table. You don't want to do anything that would inject a long running process. Your best solution would be one that is set based:
INSERT INTO table2 (...) VALUES (...)
SELECT ... FROM inserted i INNER JOIN table1 t1 ON t1.id = i.id
>> Except for transfering the data over from the old DB, the data will be entered by hand, in a data entry mode.
I'd also recommend disabling the triggers while doing the load. Duplicate the processing of the trigger into your ETL process.
-Mike
>So I could use a cursor? Except for transfering the data over from the old DB, the data will be entered by hand, in a data entry mode. I am glad for that information. Thank You.
>
>I have continued testing, and still am unable to find why the table is locking. I have tried different ways of doing the same thing, i.e. making variables in the if...else and then doing the insert/update later in the code based on those variables etc., but nothing seems to work. The ID field entry must exist, because I can do a select and get it, but the table seems to lose it somehow. I am at a loss.
>
>The trigger is an 'AFTER' trigger, so the table entry would have to exist before the trigger would fire. Any thoughts on what could be causing the table to lose it?