DECLARE @DbVer VARCHAR(500)

SELECT @DbVer = KeyValue 
FROM HotelSetup WITH (NOLOCK)
WHERE SearchKey = 'DatabaseVersionNumber'

IF SUBSTRING(@DbVer, 1, 4) = '8.1'
  UPDATE CustomerOTA SET HotelResNotifSend = 1 WHERE HotelCode = 'ESBJERG'