
IF NOT EXISTS (select * from sys.objects where type = 'TR' and name = 'STAMMT_CHANGED')
EXEC dbo.sp_executesql @statement = N'
CREATE TRIGGER [dbo].[STAMMT_CHANGED] ON dbo.[Stammt] FOR INSERT,UPDATE,DELETE
as
SET NOCOUNT on
BEGIN
EXEC dbo.APP_UPDATE ''Stations''
end'