IF EXISTS
(
  SELECT SysColumns.Name 
  FROM SysObjects WITH (NOLOCK) 
    INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
    AND SysColumns.Name = 'SendToOTA'
    WHERE SysObjects.Name = 'Reservations'
)
BEGIN
	IF NOT EXISTS(SELECT SendToOTA FROM Reservations (NOLOCK) WHERE SendToOTA = 1)
		UPDATE RESERVATIONS 
		SET SendToOTA = 1
		where OTAActivityType is not null
END

