Here is my trigger:
ALTER TRIGGER [dbo].[DeleteAssetLocationsTrigger] ON [dbo].[AssetLocation] INSTEAD OF Delete AS
Delete From Asset Where Id in (Select ObjectId from Deleted)
Delete From Location Where Id in (Select ObjectId from Deleted)
Delete From AssetLocation Where ParentId in (Select Id from Deleted)
Delete From AssetLocation Where Id in (Select Id from Deleted)
AssetLocation is a table that represents a tree. The asset and location tables are the objects of the tree. AssetLocation mainly just holds the hierarchy, and the objectId is what it uses to get the details from each object in the hierarchy...
I need a trigger that works like this. If you delete a node, then it deletes all nodes below it, and its details... The one I have now seems to be deleting the hierarchy, but it isn't getting the details in the asset and locations tables.