DROP PROC EliminarRelacion_Cliente_TPC_Proc
GO
CREATE PROC EliminarRelacion_Cliente_TPC_Proc
( @CUSTIDSS	UD_CODCLIENT,
  @PRCLVLCUSTID	UD_PRCLVLCUSTID
)
AS

BEGIN

BEGIN TRAN
	DELETE
	FROM OP_CUSTOMER_PRCLVL
	WHERE CUSTIDSS=@CUSTIDSS AND PRCLVLCUSTID=@PRCLVLCUSTID

	IF (@@error!=0)
    	BEGIN
        	RAISERROR  20002 'Error Eliminando relacion Cliente-TPC '
        	ROLLBACK TRAN
        	RETURN(1)
    
    	END

    COMMIT TRAN

    RETURN(0)
END