>>>>It does, but have you tested it?
>>>>
>>>
>>>I am working on some data at the end of a huge import so don't want test it and find out it deletes all employees or something like that :)
>>>
>>>Now that you think it looks OK, I'll back up the database and do some tests.
>>>
>>>Thanks
>>
>>It seems to look OK, but I'm not 100% sure it's going to work as you may get into the same problem of nesting level exceeded.
>>
>>I suggest to create a test table (separate from your real life with the deep chain of parent/child and then try deleting a parent with many children, grand children, etc. and see, if it will work or not).
>
>There's only one level deep, and my tests have worked so far.
>
>Thanks
With one level deep your trigger is OK. But if we want to solve a generic problem with any number of levels deep, then look into my latest reply to Boris.
If it's not broken, fix it until it is.
My Blog