SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[cs_Feed_MoveFeed]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[cs_Feed_MoveFeed]
GO

CREATE PROC [dbo].cs_Feed_MoveFeed
	@FolderFeedId INT,
	@NewFolderId INT = NULL
AS

UPDATE cs_FolderFeed
SET FolderId = @NewFolderId
WHERE FolderFeedId = @FolderFeedId


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

GRANT EXECUTE ON [dbo].cs_Feed_MoveFeed  TO PUBLIC
GO
