H
Hilary Ostrov
Using Access 2000, I have an .xls (which is listing of 7600 Items)
I've imported, which I'm *trying* to normalize. But it seems I've
been chasing myself in query circles that go nowhere
Each record has the following fields:
Description
Number
ItemType
ID
ParentID
OrderNo
First the easy parts:
Description is self-explanatory
ItemType is either 5 or 0 (5 being readily identifiable as either a
Category, Sub-Category or - what I'm calling - "Group"; and 0 being
the actual item)
OrderNo is actually a sequence to indicate order of appearance
(crucial to retain)
Number is in one of two formats: nnnn or ~~~nnnn, the latter (of which
there are 857 in total) being the clue that the record is a Category,
SubCategory, or Group.
So far so good!
I can readily pull out Categories and SubCategories and, of course,
the actual Items. BUT the hierarchy is such that while the majority
of SubCategories have Groups many don't. The end result being that
*some* actual Items' Parents are SubCategories and other actual Items'
Parents are Groups. There's even a small number of Items whose Parent
is a Category.
I do need to retain this hierarchy for identification and searching
purposes (and order of appearance) but I can't seem to figure out an
effective (or efficient) way of splitting the original data so that
it's normalized. Given all of the above, it seems I have two options:
1) Accept the fact that there will be a number of items for which
there will be no group; or
2) Make some fake groups for the groupless by giving them the same
name/ID as the SubCategory.
Which is the lesser of the two evils in a situation like this - or is
there a third option that as a relative newbie I've been unable to
divine?!
Any guidance or helpful hints would be very much appreciated. Thanks.
hro
I've imported, which I'm *trying* to normalize. But it seems I've
been chasing myself in query circles that go nowhere
Each record has the following fields:
Description
Number
ItemType
ID
ParentID
OrderNo
First the easy parts:
Description is self-explanatory
ItemType is either 5 or 0 (5 being readily identifiable as either a
Category, Sub-Category or - what I'm calling - "Group"; and 0 being
the actual item)
OrderNo is actually a sequence to indicate order of appearance
(crucial to retain)
Number is in one of two formats: nnnn or ~~~nnnn, the latter (of which
there are 857 in total) being the clue that the record is a Category,
SubCategory, or Group.
So far so good!
I can readily pull out Categories and SubCategories and, of course,
the actual Items. BUT the hierarchy is such that while the majority
of SubCategories have Groups many don't. The end result being that
*some* actual Items' Parents are SubCategories and other actual Items'
Parents are Groups. There's even a small number of Items whose Parent
is a Category.
I do need to retain this hierarchy for identification and searching
purposes (and order of appearance) but I can't seem to figure out an
effective (or efficient) way of splitting the original data so that
it's normalized. Given all of the above, it seems I have two options:
1) Accept the fact that there will be a number of items for which
there will be no group; or
2) Make some fake groups for the groupless by giving them the same
name/ID as the SubCategory.
Which is the lesser of the two evils in a situation like this - or is
there a third option that as a relative newbie I've been unable to
divine?!
Any guidance or helpful hints would be very much appreciated. Thanks.
hro