spDelete_NewsStories
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PKID | int | IN | |
@CurrentUsersID | int | IN |
Definition
Copy
CREATE PROCEDURE dbo.spDelete_NewsStories
(
@PKID int ,
@CurrentUsersID int
)
AS
begin transaction
declare @SiteContentID int
select @SiteContentID = SiteContentID
from NewsChannels c
inner join NewsStories s on s.NewsChannelID = c.[id]
and s.id = @PKID
DELETE FROM NewsStories where ID = @PKID
DELETE FROM Search where SiteContentID = @SiteContentID and SearchInt1 = @PKID
commit transaction