﻿USE [AIADatabaseV5]
GO
/****** Object:  StoredProcedure [dbo].[NewUpdateCommand]    Script Date: 2/1/2018 12:15:55 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

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

CREATE PROCEDURE [dbo].[NewUpdateCommand]
(
	@Title varchar(50),
	@Priority tinyint,
	@IsActive bit,
	@Original_Id tinyint,
	@Original_Title varchar(50),
	@Original_Priority tinyint,
	@Original_IsActive bit,
	@Id tinyint
)
AS
	SET NOCOUNT OFF;
UPDATE [Edition] SET [Title] = @Title, [Priority] = @Priority, [IsActive] = @IsActive WHERE (([Id] = @Original_Id) AND ([Title] = @Original_Title) AND ([Priority] = @Original_Priority) AND ([IsActive] = @Original_IsActive));
	
SELECT Id, Title, Priority, IsActive FROM Edition WHERE (Id = @Id)
GO
