DROP PROCEDURE ActualizaTurnoActualProc
GO
CREATE PROCEDURE ActualizaTurnoActualProc
(	@TURNO	TINYINT 
)
AS
BEGIN
    BEGIN TRAN

    UPDATE SETUP
    SET	SALESPERSONTURN=@TURNO

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

    COMMIT TRAN

END

