IF NOT EXISTS (SELECT 1
			FROM sys.indexes AS i  
			INNER JOIN sys.data_spaces AS ds ON i.data_space_id = ds.data_space_id  
			WHERE is_hypothetical = 0 AND i.index_id <> 0   
			AND i.object_id = OBJECT_ID('Cbtes_Items')
			AND i.name = 'IX_CBTI_PorProdLote'
	)
BEGIN
	CREATE NONCLUSTERED INDEX [IX_CBTI_PorProdLote] ON [dbo].[Cbtes_Items]
		(
		[Id_Producto] ASC,
		[Lote] ASC
		)
END

