IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('dbo.Pres_venta') AND NAME ='IX_Pres_venta_fecha')
    DROP INDEX [IX_Pres_venta_fecha] ON dbo.Pres_venta;
GO
CREATE UNIQUE NONCLUSTERED INDEX IX_Pres_venta_fecha ON [dbo].[Pres_venta]
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO

IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('dbo.Ped_venta') AND NAME ='IX_Ped_venta_fecha')
    DROP INDEX [IX_Ped_venta_fecha] ON dbo.Ped_venta;
GO
CREATE UNIQUE NONCLUSTERED INDEX IX_Ped_venta_fecha ON [dbo].[Ped_venta]
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO

IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('dbo.Alb_venta') AND NAME ='IX_Alb_venta_fecha')
    DROP INDEX [IX_Alb_venta_fecha] ON dbo.Alb_venta;
GO
CREATE UNIQUE NONCLUSTERED INDEX IX_Alb_venta_fecha ON [dbo].[Alb_venta]
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO

IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('dbo.Facturas_venta') AND NAME ='IX_Facturas_venta_fecha')
    DROP INDEX [IX_Facturas_venta_fecha] ON dbo.Facturas_venta;
GO
CREATE UNIQUE NONCLUSTERED INDEX IX_Facturas_venta_fecha ON [dbo].[Facturas_venta]
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO

IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('dbo.Ped_compra') AND NAME ='IX_Ped_compra_fecha')
    DROP INDEX [IX_Ped_compra_fecha] ON dbo.Ped_compra;
GO
CREATE UNIQUE NONCLUSTERED INDEX IX_Ped_compra_fecha ON [dbo].[Ped_compra]
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO

IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('dbo.Alb_compra') AND NAME ='IX_Alb_compra_fecha')
    DROP INDEX [IX_Alb_compra_fecha] ON dbo.Alb_compra;
GO
CREATE UNIQUE NONCLUSTERED INDEX IX_Alb_compra_fecha ON [dbo].[Alb_compra]
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO

IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('dbo.Fac_compra') AND NAME ='IX_Fac_compra_fecha')
    DROP INDEX [IX_Fac_compra_fecha] ON dbo.Fac_compra;
GO
CREATE UNIQUE NONCLUSTERED INDEX IX_Fac_compra_fecha ON [dbo].[Fac_compra]
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO

IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('dbo.Op') AND NAME ='IX_Op_fecha')
    DROP INDEX [IX_Op_fecha] ON dbo.Op;
GO
CREATE UNIQUE NONCLUSTERED INDEX IX_Op_fecha ON [dbo].[Op]
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO