I have a trigger, that I want to try to update a field based off the value of another table. I have manually verified that the data exists in the other table so I know the join will work. However, data is being inserted into the table, but no update made. Which makes me think I did something off with the trigger
Create Trigger [dbo].[trig_OnInsert] ON [dbo].[SHIPMENT] For Insert AS BEGIN UPDATE si SET si.au = au.au + ' - ' + si.au FROM SHIPMENT si JOIN alphauniversal au ON si.cm_controllerID = au.controllerid WHERE si.cm_controllerID IN (Select si.cm_controllerID FROM Inserted) End
Also, if the trigger presents an error, or doesn't execute successfully, will the record still be inserted in the table?