• I frankly don’t understand the intent of your first paragraph. In addition, my issue description says, “We are using SQL Server 2005.” Yes, I am stuck with the database; I did not design it.

    You say did I not follow proper netiquette. Would you please provide some guidance on this? I basically described the issue as I saw it.

    I solved the problem by writing a recursive stored procedure that only needed to recall itself when it encountered a phantom. It was very fast and I only had to connect to the database once and I received a record set that had all the data I needed. I was writing an add-on to an application by a major company which later told me I was not allowed to use a stored procedure of any kind unless they wrote it. I ended up using a recursive CTE which turned out to be slower because I had to connect to the database as often as the top level BOM had a phantom.

    Three and a half years have passed since I posted the issue and was a bit surprised by your response to it. I only recently became familiar with nested sets within a database and have used that approach with recursive CTEs for creating org charts; creating production orders from BOMs is next. The book I’m using for this refers to your SQL for Smarties book but it looks like you have a whole book covering trees and hierarchies in SQL and will consider getting it.

    I don’t understand the Ackermann function and couldn’t find an inabstruse explanation on the Internet. Maybe your book will do a better job of it.