Hi there, all. Hope you're all doing well.
I'm once again struggling with a trigger issue. I've written a trigger as below, one each for update, delete and insert. When I test in DEV by doing an update, insert or delete, I don't get any error messages. When I go check the table created for storing information as the triggers are fired, they're empty. Is there anything wrong with the trigger? Any help would be greatly appreciated!
USE [JDE_CRP]
GO
/****** Object: Trigger [CRPDTA].[F0150_PDS_Delete] Script Date: 09/30/2008 08:40:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [CRPDTA].[F0150_PDS_Delete]
ON [CRPDTA].[F0150]
AFTER DELETE
AS
INSERT INTO CRPDTA.SC0150(CXCKEY, CXEDSP, CXAN8, CXSCDT, CXATIM, CXADLJ, CXARTM)
select CXCKEY = ('SC0150 ' + CONVERT(char(23), CURRENT_TIMESTAMP, 21)),
CXEDSP = '0',
CXAN8 = CRPDTA.F0150.MAAN8,
CXSCDT = CRPDTA.F0150.MAUPMJ,
CXATIM = CRPDTA.F0150.MAUPMT,
CXADLJ = '0.0',
CXARTM = ''
from DELETED d, CRPDTA.F0150
Let me deal... MY WAY!