DROP PROCEDURE AgregarClienteTPCProc
GO
CREATE PROCEDURE AgregarClienteTPCProc
(
 	@CUSTIDSS	UD_CODCLIENT,             
	@PRCLVLCUSTID 	UD_PRCLVLCUSTID,
	@USERID		UD_USERID
)
AS
BEGIN
    BEGIN TRAN

    INSERT INTO OP_CUSTOMER_PRCLVL(CUSTIDSS,PRCLVLCUSTID,USERID)
    VALUES(@CUSTIDSS,@PRCLVLCUSTID,@USERID)

    IF (@@error!=0 OR @@ROWCOUNT=0)
    BEGIN
        RAISERROR  20000 'Error Insertando en OP_CUSTOMER_PRCLVL'
        ROLLBACK TRAN
        RETURN(1)
    
    END

    COMMIT TRAN

END