Thursday, October 23, 2014

SQL Server - Recursive CTE query to get manager hierarchy

I've used the CONNECT BY syntax to do hierarchy queries in oracle, but recursive queries seem to be the new standard (not so new I guess, but new for me!). Now that I'm using SQL server it seems to be the only way to go. So here's my reference for walking a single table parent/child hierarchy:

No comments: