IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_ArrangementLines_ArrTolerance')
CREATE NONCLUSTERED INDEX IX_ArrangementLines_ArrTolerance ON [dbo].[ArrangementLines]
(
	[Date] ASC,
	[Time] ASC,
	[PacketItemNumber] ASC,
	[WareNumber] ASC,
	[FK_ExDepartment] ASC
) 
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE name='IX_ArrangementReservationsXtab_ReferenceNumber' AND object_id = OBJECT_ID('dbo.ArrangementReservationsXtab'))
  CREATE NONCLUSTERED INDEX [IX_ArrangementReservationsXtab_ReferenceNumber] ON [dbo].[ArrangementReservationsXtab] ([Referencenumber])
GO
