IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_MISHistory_DateStampValueType')
  CREATE NONCLUSTERED INDEX IX_MISHistory_DateStampValueType ON [dbo].[MISHistory] ([SystemDate],[FK_HotelCustomerNumber],[DateStamp],[ValueType])
GO