tomatdeepwater
Programmer
I have an MS-Access lookup table that contains various categories and subcategories. The fields are:
-------------------------------------------------
TABLE: tblCategory
FIELDS:
CategoryID (Prime Key) -- Autonumber, indexed
Category_Description -- text
fkParentID (Foreign Key pointing to
tblCategory.CategoryID) -- Long integer
I have another table that assigns costs to some subset of the "child" categories.
-------------------------------------------------
TABLE: tblCost
FIELDS:
CostID (Prime Key) -- Autonumber, indexed
fkCategoryID -- (Foreign Key pointing to
tblCategory.CategoryID)
Cost -- currency
-------------------------------------------------
I need to create a select query that shows:
FIELDS:
Category_Description
Cost
Here is the "catch". The query needs to show all the children and their parents simultaneously with child costs "rolled up" and assigned to their parents, recursively all the way to the "root node" with the parents and children sorted in hierarchical order.
When I was working with SQL-Server, I seem to remember a way of doing this without coding.
QUESTION: Is there a preferred way to do this in MS-Access?
-------------------------------------------------
TABLE: tblCategory
FIELDS:
CategoryID (Prime Key) -- Autonumber, indexed
Category_Description -- text
fkParentID (Foreign Key pointing to
tblCategory.CategoryID) -- Long integer
I have another table that assigns costs to some subset of the "child" categories.
-------------------------------------------------
TABLE: tblCost
FIELDS:
CostID (Prime Key) -- Autonumber, indexed
fkCategoryID -- (Foreign Key pointing to
tblCategory.CategoryID)
Cost -- currency
-------------------------------------------------
I need to create a select query that shows:
FIELDS:
Category_Description
Cost
Here is the "catch". The query needs to show all the children and their parents simultaneously with child costs "rolled up" and assigned to their parents, recursively all the way to the "root node" with the parents and children sorted in hierarchical order.
When I was working with SQL-Server, I seem to remember a way of doing this without coding.
QUESTION: Is there a preferred way to do this in MS-Access?