Org Charts in T-SQL, Three Ways
One hierarchy, three implementations - a recursive CTE, a view that calls a scalar function on every row, and a whole family of tree procs - plus a relationship flag that is a decimal number pretending to be binary.
Newest first, grouped by year. Search or filter by topic.
One hierarchy, three implementations - a recursive CTE, a view that calls a scalar function on every row, and a whole family of tree procs - plus a relationship flag that is a decimal number pretending to be binary.
An entire stored-procedure framework built on an EF6 extension library, shipped inside an EF Core app, in a folder named Future - the anatomy of an abandoned migration and how to recognise one.
Reflection that builds EXEC statements, a table-valued function called by string interpolation, and a raw ADO.NET runner returning lists of lists - one codebase, three coexisting answers to the same question.