mes.spDeleteAsset
Description
Deletes a single asset and its associated metadata. Also deletes historical records such as state events, counters, and mode events. If child assets exist, they will be recursively deleted as well.
Syntax
mes.spDeleteAsset @assetIdParameters:
@assetId (int): The ID of the asset to delete, along with all of its descendants and associated records.
Returns:
int: Total number of rows deleted or updated.
Code Example
-- Delete asset and its history
EXEC mes.spDeleteAsset @assetId = 3099;