SET NOCOUNT ON

IF EXISTS
(
  SELECT SysColumns.Name 
  FROM SysObjects WITH (NOLOCK) 
    INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
    AND SysColumns.Name = 'RoomsAvailableRoomType'
    WHERE SysObjects.Name = 'RateLevelRoomTypeRestrictionXTab'
)
BEGIN
  UPDATE RateLevelRoomTypeRestrictionXTab SET RoomsAvailableRoomType = 0 WHERE RoomsAvailableRoomType IS NULL 
END

IF EXISTS
(
  SELECT SysColumns.Name 
  FROM SysObjects WITH (NOLOCK) 
    INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
    AND SysColumns.Name = 'RoomsAvailableTotal'
    WHERE SysObjects.Name = 'RateLevelRoomTypeRestrictionXTab'
)
BEGIN
  UPDATE RateLevelRoomTypeRestrictionXTab SET RoomsAvailableTotal = 0 WHERE RoomsAvailableTotal IS NULL 
END