The idea of this script is to demonstrate how a recurive common table expression can be used to derive hirearchial data. The example given is an employee table where each record pertains to an employee, which has a link to the manager record in the same table.
Using a technique such as this is far more efficient than using cursors.
The script sets up a table variable of hirearchial employee data.
To test, set the @BossID to a valid employee ID.