So, if I run the following trigger, it works when using the query analyzer and the database name selected in the toolbar. CREATE TRIGGER SOMAddExtras ON M2MData01.dbo.SOitem AFTER INSERTASSET NOCOUNT ONIF EXISTS (SELECT dbo.somast.fsono FROM dbo.somast INNER JOIN inserted ON dbo.somast.fsono = inserted.fsono WHERE somast.fstatus = 'Open') BEGIN UPDATE SOM SET SOM.fprodcl = I.fprodcl, SOM.fpartno = I.fpartno, SOM.fgroup = I.fgroup FROM [CheltonCustomizations].[dbo].[soMods] SOM INNER JOIN inserted I ON SOM.FSONO = I.FSONO AND SOM.FENUMBER = I.FENUMBER ENDGO
However, when I try to add various items to various databases, I don't know the proper syntax to change the "assigned" database between scripts. Does that make sense? Do I assign the database to be affected with the USE statement?