USP_INTERACTIONCATEGORYCODE_DELETEENTRY

Used to delete a table entry in the "Interaction Category" 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:  12/17/2008 2:19:18 AM
Assembly Version:  Blackbaud.AppFx.Platform.SqlClr, Version=1.7.1271.0, Culture=neutral, PublicKeyToken=null
Copyright Blackbaud
*/
CREATE procedure dbo.USP_INTERACTIONCATEGORYCODE_DELETEENTRY
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = NULL
)

as

SET NOCOUNT ON;

declare @s int
select @s = SEQUENCE
from dbo.INTERACTIONCATEGORYCODE
where ID = @ID

declare @r int
exec @r= dbo.USP_INTERACTIONCATEGORYCODE_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
if @r <> 0 return @r;

update dbo.INTERACTIONCATEGORYCODE
set SEQUENCE = SEQUENCE - 1,
            CHANGEDBYID=@CHANGEAGENTID,
            DATECHANGED=GETDATE()
where SEQUENCE > @s;

return 0;