I'm a novoice in db operations. SQL Server 2008 R2 is the database I'm using.
I need to move selected rows from a staging database table to production database table. I'm using SSIS package to do that. I've few triggers on destination table. I'm now confused whether these triggers will be fired or not when I transfer the data from source table to destination table.
If these triggers won't be fired while transferring data from source to destination table, is there anything can be done to fire these triggers during this data transfer?
Giving me some information on the above will be greatly appreciated.
Update: Selected rows will be added to the destination table. Triggers will update data in some other table in the destination server based on newly inserted data. For example:
CREATE TRIGGER [MyTableChange]
declare @newid as int
select @newid=newid FROM INSERTED
Declare @total as int
declare @lookatme as int
select @total=total, @lookatme from DestinationTable where newid=@newid
update anothertable set total=total+@total where lookwhere=@lookatme
Above trigger is kind of example not exactly same logic which I've in original trigger. But it gives info of what exactly I'm trying to do. I'll be accessing newly inserted row details to update another table value. Please do not take this as correct trigger in terms of syntax and way it is written. I just tried to give essence of original trigger.