USP_ACTIONITEMTOPICCODE_DELETEENTRY
Used to delete a table entry in the "Action Item Topic codes" code table.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The ID of the table entry being deleted. |
@CHANGEAGENTID | uniqueidentifier | IN | The ID of the change agent deleting the table entry. |
Definition
Copy
/*
Generated by Blackbaud AppFx Platform
Date: 8/2/2010 7:25:08 PM
Assembly Version: Blackbaud.AppFx.Platform.SqlClr, Version=2.7.1654.0, Culture=neutral, PublicKeyToken=null
Copyright Blackbaud
*/
CREATE procedure dbo.USP_ACTIONITEMTOPICCODE_DELETEENTRY
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = NULL
)
as
SET NOCOUNT ON;
declare @s int
select @s = SEQUENCE
from dbo.ACTIONITEMTOPICCODE
where ID = @ID
declare @r int
exec @r= dbo.USP_ACTIONITEMTOPICCODE_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
if @r <> 0 return @r;
update dbo.ACTIONITEMTOPICCODE
set SEQUENCE = SEQUENCE - 1,
CHANGEDBYID=@CHANGEAGENTID,
DATECHANGED=GETDATE()
where SEQUENCE > @s;
return 0;