IF NOT EXISTS
 (SELECT 1 FROM HOTELSETUP (NOLOCK)
  WHERE SEARCHKEY = 'InternalCourseProduction' AND KEYVALUE = 1)
BEGIN

  UPDATE CUSTOMER 
  SET MAILRULECONFIRMATIONS = 4 
  WHERE CUSTOMERTYPENUMBER <> 1 

  UPDATE CUSTOMER 
  SET MAILRULECONFIRMATIONS = 1 
  WHERE CUSTOMERTYPENUMBER = 1 

END
GO