Deleting HEATNote and HEATMsg without Affecting Alarms.

Version 1

    Details

    Is it possible to truncate the HEATNote and HEATMsg tables without deleting any of the configured Alarms?


    Resolution

    Run the following 2 queries to remove all entries in the tables except those related to Alarms.

    Be sure to backup the database first in case of problems as these statements are not reversible.

    DELETE FROM HEATNote WHERE MMsgID NOT IN (SELECT MMsgID FROM HEATMsg WHERE MType = 'A')

    DELETE FROM HEATMsg WHERE MType <> 'A'