SET NOCOUNT ON

BEGIN TRAN

BEGIN TRY

	DELETE FROM [dbo].[LJ_ETL_VERSAO_LOJA]

	INSERT INTO [dbo].[LJ_ETL_VERSAO_LOJA]
			   ([VERSAO]
			   ,[CODIGO_FILIAL]
			   ,[FILIAL])
		 VALUES
			   ('3.1.10'
			   ,'0000'
			   ,'DEFAULT')
	
	PRINT 'COMMIT';
	COMMIT;

END TRY
BEGIN CATCH

	PRINT 'ROLLBACK';
	ROLLBACK;

	SELECT ERROR_NUMBER() AS ErrorNumber, ERROR_MESSAGE() AS ErrorMessage

END CATCH