samusprime
MIS
I have this table (ItemsSold) with 1000 record. It contains these records:
Date Product Type Gallons
1/12/2005 Milk Dairy 4253
1/12/2005 2% Milk Diary 6343
1/13/2005 10% Juice Mix Juices 3245
1/13/2005 10% Juice Mix Juices 3445
1/14/2005 Diet Pepsi Soda 149
1/14/2005 Coke Soda 2934
Notice the product "10% Juice Mix" (4th record) with gallons value error of 3445.
I know for a fact that this record with incorrect gallons value:
1/13/2005 10% Juice Mix Juices 3445
was inserted before this record (correct gallons value):
1/13/2005 10% Juice Mix Juices 3245
Is there a way to identify records with matching Date, Product, and Type, that will delete the record the record that was inserted first? I know how to delete one bad record, but what if I had hundreds of records that were entered with incorrect gallons? I.E. Hundreds of pairs like the example of above. Is there a way to delete all the incorrect records in one fell swoop?
Note: There is no primary key and the presented table above IS the entire table.
Thanks in advance for any help!
Date Product Type Gallons
1/12/2005 Milk Dairy 4253
1/12/2005 2% Milk Diary 6343
1/13/2005 10% Juice Mix Juices 3245
1/13/2005 10% Juice Mix Juices 3445
1/14/2005 Diet Pepsi Soda 149
1/14/2005 Coke Soda 2934
Notice the product "10% Juice Mix" (4th record) with gallons value error of 3445.
I know for a fact that this record with incorrect gallons value:
1/13/2005 10% Juice Mix Juices 3445
was inserted before this record (correct gallons value):
1/13/2005 10% Juice Mix Juices 3245
Is there a way to identify records with matching Date, Product, and Type, that will delete the record the record that was inserted first? I know how to delete one bad record, but what if I had hundreds of records that were entered with incorrect gallons? I.E. Hundreds of pairs like the example of above. Is there a way to delete all the incorrect records in one fell swoop?
Note: There is no primary key and the presented table above IS the entire table.
Thanks in advance for any help!