CREATE TRIGGER APPLICATION_UPDATE 
ON APPLICATION
INSTEAD OF UPDATE
AS
BEGIN
  DECLARE @APP_STATUS VARCHAR(32);
  SELECT TOP 1 APPLICATION.APP_STATUS into APP_STATUS FROM APPLICATION WHERE APP_UID = 'NEW.APP_UID';

  IF('OLD.APP_STATUS'<>'NEW.APP_STATUS')
    SET @APP_STATUS = 'NEW.APP_STATUS';
    UPDATE APP_CACHE_VIEW SET APP_STATUS = @APP_STATUS WHERE APP_UID = 'NEW.APP_UID';
END