use [--name--]
GO
SET NOCOUNT ON
GO
--*****************************************************************************
-- Creates the stored procedure to handle id conflicts.
--
--
-- $Id: //rdsw/dev/cayman/SW_ION_E/database/DefaultData/MeasurementMap/01.CreateConflictHandler.sql#1 $
--
--*****************************************************************************
IF	(
		EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spEntryConflictHandler]') 
		AND OBJECTPROPERTY(id, N'IsProcedure') = 1) 
 	)
	DROP PROCEDURE [dbo].spEntryConflictHandler
GO

CREATE PROCEDURE dbo.spEntryConflictHandler
	@oldID				SMALLINT,
	@ID					SMALLINT,
	@conflictingName	NVARCHAR(250),
	@deleteOld			BIT = 1
AS
	RAISERROR(N'Duplicate standard name found for ''%s'': %d', 16, 1, @conflictingName, @oldID)

GO
