After Insert トリガーを実行しようとしていますが、機能しません。ログを確認する方法はありますか?
これが私のコードです
ALTER TRIGGER [dbo].[SUBSID_INSERT] on [dbo].[STUDENT_MASTER] AFTER INSERT AS
BEGIN
SET NOCOUNT ON
DECLARE @numrows int, @hostname char(30), @sysuser char(30);
SELECT @numrows = @@rowcount;
IF @numrows = 0 RETURN;
SELECT @hostname = substring(hostname, 1, 30)
FROM master.dbo.sysprocesses
WHERE spid = @@spid;
SELECT @sysuser = substring(system_user, 1, 30);
INSERT INTO insert statement,
FROM STUDENT_MASTER JOIN INSERTED I ON STUDENT_MASTER.ID_NUM = I.ID_NUM
JOIN NAME_MASTER ON NAME_MASTER.ID_NUM = STUDENT_MASTER.ID_NUM
WHERE
STUDENT_MASTER.id_num not in ( select DISTINCT id_num from subsid_master where subsid_cde LIKE '0%')
END
GO