G
Guest
An access 2000 database i am currently working on is getting big fast.
i have two tables that are being used to keep the data. tbleDefects and TBL
defect count. TBL defect count has the following columns; ID (auto
increment), Date, PartNum (Part Number), shift, sorttime, totalsort, NCM_num,
containment, & PlantNum. tblDefects has the following; AutoID (auto
Increment), ID (same number from ID field in TBL defect count), defcode
(defect code), defquantity(defect quantity). this is allowing one record for
the part number, but multiple records for the different defcode and their
corresponding quantities.
what i want to do is create another table where on a monthly basis i can
take all data from the other tables and combine it into 1 record per defcode
per partnumber. ( there is 27 defect codes, so there should be at the most 27
records per month per part number). i am wanting to sum all of the defects
for the same defect code for the same part number.
ex:
Part number 1234abc had 3 different defects. def codes 1,2,3 respectively
and quantitys 4,5,6 respectively. this gives me one record in TBL defect
count, but three records in tbldefects. now after 5 days, assuming; the same
partnumber, defect codes, and quantities each day, the third table should
have three records in it, 1 for each defect code, along with the sum of
defects for each code.
this is meant just to archive the data for a few months at a time before
deleting, am hoping to keep the database from getting too large.
Thank you in advance for any help and insight you can give...
i have two tables that are being used to keep the data. tbleDefects and TBL
defect count. TBL defect count has the following columns; ID (auto
increment), Date, PartNum (Part Number), shift, sorttime, totalsort, NCM_num,
containment, & PlantNum. tblDefects has the following; AutoID (auto
Increment), ID (same number from ID field in TBL defect count), defcode
(defect code), defquantity(defect quantity). this is allowing one record for
the part number, but multiple records for the different defcode and their
corresponding quantities.
what i want to do is create another table where on a monthly basis i can
take all data from the other tables and combine it into 1 record per defcode
per partnumber. ( there is 27 defect codes, so there should be at the most 27
records per month per part number). i am wanting to sum all of the defects
for the same defect code for the same part number.
ex:
Part number 1234abc had 3 different defects. def codes 1,2,3 respectively
and quantitys 4,5,6 respectively. this gives me one record in TBL defect
count, but three records in tbldefects. now after 5 days, assuming; the same
partnumber, defect codes, and quantities each day, the third table should
have three records in it, 1 for each defect code, along with the sum of
defects for each code.
this is meant just to archive the data for a few months at a time before
deleting, am hoping to keep the database from getting too large.
Thank you in advance for any help and insight you can give...