Relative Content

Tag Archive for sqlsql-serverrecursion

SQL Server recursion with multiple tables

I’m trying to get users that are part of groups, but groups can be members of groups as well. So the question is about who has “effective” access to certain groups. I’ve seen many examples of using CTE on SQL Server and this seems like the same case, but all the examples are pretty simple about a single table like an org chart. In my case, I have to join multiple tables and just can’t grasp the whole recursion thing.