The row value(s) updated or deleted either do not make the row unique or they alter multiple rows (2 rows).
Put SET NOCOUNT ON as following:-
Create TRIGGER [dbo].[OBIEE_USERSTRI_DEL]
ON
[dbo].[WC_OBIEE_USERS]FOR
DELETEAS
SET
NOCOUNT ONBEGIN
DECLARE
@USERNAME1 VARCHAR(100)DECLARE
@GROUPNAME1 VARCHAR(2000)SELECT
@USERNAME1 =USERNAME,@GROUPNAME1=GROUPNAME FROM Deletedinsert
into WC_OBIEE_AUDIT(USERNAME,GROUPNAME,USERID,DATEUPD,WORKSTN,[ACTION])select
@USERNAME1,@GROUPNAME1,SYSTEM_USER,getdate(),host_name() ,'Delete'END
No comments:
Post a Comment