USE [Customer] GO /* This is SP Begining Comment generated from Tools4SQL.net - T4S Stored Procedure Generator. Website : http://www.tools4sql.net Email : info@tools4sql.net */ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF EXISTS (SELECT * FROM sys.sysobjects WHERE id = object_id(N'[dbo].[PR_MST_Customer_DeleteByUK_CustomerName]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1) BEGIN DROP PROCEDURE [dbo].[PR_MST_Customer_DeleteByUK_CustomerName] END GO /* -- ============================================= -- Author : Tools4SQL.net - T4S Stored Procedure Generator -- Create date: 01-March-2011 -- Description: This stored procedure is generated by T4S Stored Procedure Generator. -- ============================================= */ -- [dbo].[PR_MST_Customer_DeleteByUK_CustomerName] @CustomerName = 'CustomerName' CREATE PROCEDURE [dbo].[PR_MST_Customer_DeleteByUK_CustomerName] @CustomerName varchar (100) /* This is SP Parameter Comment generated from Tools4SQL.net - T4S Stored Procedure Generator. Website : http://www.tools4sql.net Email : info@tools4sql.net */ AS SET NOCOUNT ON; /* This is SP Body Comment generated from Tools4SQL.net - T4S Stored Procedure Generator. Website : http://www.tools4sql.net Email : info@tools4sql.net */ BEGIN TRY BEGIN TRAN DELETE FROM [dbo].[MST_Customer] WHERE [dbo].[MST_Customer].[CustomerName] = @CustomerName COMMIT TRAN END TRY BEGIN CATCH ROLLBACK TRAN DECLARE @ErrorNumber_INT INT; DECLARE @ErrorSeverity_INT INT; DECLARE @ErrorProcedure_VC VARCHAR(200); DECLARE @ErrorLine_INT INT; DECLARE @ErrorMessage_NVC NVARCHAR(4000); SELECT @ErrorMessage_NVC = ERROR_MESSAGE(), @ErrorSeverity_INT = ERROR_SEVERITY(), @ErrorNumber_INT = ERROR_NUMBER(), @ErrorProcedure_VC = ERROR_PROCEDURE(), @ErrorLine_INT = ERROR_LINE() RAISERROR(@ErrorMessage_NVC,@ErrorSeverity_INT,1); END CATCH GO --~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~