
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS
           WHERE TABLE_NAME = 'CampaignCodesHotel' AND COLUMN_NAME = 'LengthOfStayCompare' AND DATA_TYPE = 'SMALLINT')
BEGIN
  ALTER TABLE CampaignCodesHotel ALTER COLUMN LengthOfStayCompare TINYINT NULL
END
GO

IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS
           WHERE TABLE_NAME = 'CampaignCodesHotel' AND COLUMN_NAME = 'LengthOfStayValue' AND DATA_TYPE = 'INT')
BEGIN
  ALTER TABLE CampaignCodesHotel ALTER COLUMN LengthOfStayValue SMALLINT NULL
END
GO

IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS
           WHERE TABLE_NAME = 'CampaignCodesHotel' AND COLUMN_NAME = 'NumberOfRoomsCompare' AND DATA_TYPE = 'SMALLINT')
BEGIN
  ALTER TABLE CampaignCodesHotel ALTER COLUMN NumberOfRoomsCompare TINYINT NULL
END
GO

IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS
           WHERE TABLE_NAME = 'CampaignCodesHotel' AND COLUMN_NAME = 'NumberOfRoomsValue' AND DATA_TYPE = 'INT')
BEGIN
  ALTER TABLE CampaignCodesHotel ALTER COLUMN NumberOfRoomsValue SMALLINT NULL
END
GO
