Files
DP44/DataPRO_sql/dbo.Alter_sp_CustomerDetailsDelete.sql

71 lines
1.5 KiB
MySQL
Raw Permalink Normal View History

2026-04-17 14:55:32 -04:00
<EFBFBD><EFBFBD>USE [DataPRO]
GO
/****** Object: StoredProcedure [dbo].[sp_CustomerDetailsDelete] Script Date: 3/14/2019 3:29:46 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_CustomerDetailsDelete]
@Name nvarchar(255) = null
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
SET NOCOUNT ON;
set @errorNumber = 0
set @errorMessage = space(0)
declare @CustomerId int
set @CustomerId = dbo.foo_IdGetCustomer(@Name)
UPDATE [dbo].[TestSetups] SET CustomerId = null WHERE CustomerId = @CustomerId
delete from [dbo].[CustomerDetails] WHERE @Name is null or [CustomerId] = @CustomerId
END