Very helpful info, Mark. thanks.
I have a tree data in a table with (id, parentid,...) the depth of the tree reach 100.
As I mentioned in for this post, I want to find out all parent id for any node. I have a easy solution with cursor, but with bad performance with large amount of data. When I try recursion trigger, it is not working as nest level limited to 16. this is same to recursive proc(func).
I am looking for a solution with set-base processing, but still in struggling. will continue trying...
wondering if insert one by one to tempdb, then get a batch of row and insert into physical table, if this solution has better performance than cursor?