How can I create functionality in SQL Server similar to the Oracle keyword CONNECT BY, which lets me manage parent-child hierarchies, such as manager-employee relationships in an organizational chart?
Hierarchical relationships such as those in organizational charts or bills-of-lading can be difficult to implement in standard ANSI SQL, and Microsoft hasn't created a specific T-SQL function that mimics Oracle's CONNECT BY keyword. Until Microsoft supplies a specific function to handle such common relationships, you can check out two T-SQL solutions that might meet your needs.
SQL...