Gustav Brock
Gustav at cactus.dk
Wed Aug 24 04:08:09 CDT 2005
Hi Bruce and Marty A recent article from MySQL covers this topic: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html Still, I'm not sure these nested sets are pure happiness - on average you have to update 50% of all records when inserting or deleting a record. /gustav >>> martyconnelly at shaw.ca 07/20 1:49 am >>> Do you mean the nested set solution from Joe Celko It is further written up in his book "SQL for Smarties" http://www.mvps.org/access/queries/qry0023.htm or this one http://www.mvps.org/access/modules/mdl0027.htm Bruen, Bruce wrote: >Hi folks, > >I thought I had got over this one years ago and can't find the SQL query >template someone (Lembit???) here kindly supplied last time. > >But it has come back to get me again, so.... > >Does someone have a "template" query to return all the parts in an >n-level parts explosion, preferably in binary-tree pre-order order. >* all components, subcomponents and parts are held in the same table, >* it is a one way tree - i.e. parts that are used in multiple assemblies >appear multiple times in the table (i.e.i.e. the pkey for the tree table >is not the SKU) > > >tia >bruce > > > -- Marty Connelly Victoria, B.C. Canada