Hello all.
Question... I have put together a hiearchical structured table...it is used to group products into categories, subcategories, subsubcategories, etc.
My Categories table is set up as such: CategoryID, CategoryLevel, CategoryName, ParentID. Where CategoryID is the PK, CategoryLevel tells me if it is a category, subcategory, subsub, etc, and ParentID is the categoryID of that category's parent.
Ok, here's my question. I am trying to run a report that will give me the entire hierarchical structure of a product. So it needs to show Category, SubCategory, etc... But I only really know how to show the lowest level (I have a table ProductsCategories that has columns ProductID and CategoryID).
Can you tell me how to report the entire structure? I am new to db design, but I do think I set up the tables correctly.
I am using Access2000, but even if you tell me the SQL statements I'd be happy (but happier with the Access2000 process).
Thanks!
Nicole
Question... I have put together a hiearchical structured table...it is used to group products into categories, subcategories, subsubcategories, etc.
My Categories table is set up as such: CategoryID, CategoryLevel, CategoryName, ParentID. Where CategoryID is the PK, CategoryLevel tells me if it is a category, subcategory, subsub, etc, and ParentID is the categoryID of that category's parent.
Ok, here's my question. I am trying to run a report that will give me the entire hierarchical structure of a product. So it needs to show Category, SubCategory, etc... But I only really know how to show the lowest level (I have a table ProductsCategories that has columns ProductID and CategoryID).
Can you tell me how to report the entire structure? I am new to db design, but I do think I set up the tables correctly.
I am using Access2000, but even if you tell me the SQL statements I'd be happy (but happier with the Access2000 process).
Thanks!
Nicole