DROP PROC TMP_TURNSIDEInsProc
GO
CREATE PROC TMP_TURNSIDEInsProc
(	@CORRNBR	INT,
	@SIDE		UD_CARA
)
AS
BEGIN
	BEGIN TRAN

	INSERT 	INTO 	TMP_TURNSIDE(CORRNBR,SIDE)
		VALUES(@CORRNBR,@SIDE)

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

	COMMIT TRAN
	RETURN(0)

END 


