This script uses an old mathematical way of doing hierarchical queries. The most common way of showing hierarchical data in SQL Server is by creating a stored procedure that calls itself. This is not a recent problem, in fact this programming technique has been around since the first programming languages. By using stacks, you can create hierarchies effectively. At a minimum, this would be great for those people that have more than 32 levels.
In SQL Server 2005, this is extremely easy! Check out: