March 7, 200520 yr I have a shipping file that has a record for each customer purchase as follows: Record 1 Name: joe Smith Address: 45 J st Item purchased: widget 34 Weight 5oz Record 2 Name: joe Smith Address: 45 J st Item purchased: widget 57 Weight 10oz Record 3 Name: joe Smith Address: 45 J st Item purchased: widget 16 Weight 5oz How can I determine the total weight for this customer when all three of the widgets are in separate records? I think a self join relationship would work somehow, or creating a new record with globals for the weights?? Attached is my work on a script to find the duplicate names I am close but I have hit a wall. Any help would be appreciated. Thank you.
March 7, 200520 yr Author I have a shipping file that has a record for each customer purchase as follows: Record 1 Name: joe Smith Address: 45 J st Item purchased: widget 34 Weight 5oz Record 2 Name: joe Smith Address: 45 J st Item purchased: widget 57 Weight 10oz Record 3 Name: joe Smith Address: 45 J st Item purchased: widget 16 Weight 5oz How can I determine the total weight for this customer when all three of the widgets are in separate records? I think a self join relationship would work somehow, or creating a new record with globals for the weights?? Attached is my work on a script to find the duplicate names I am close but I have hit a wall. Any help would be appreciated. Thank you.
March 7, 200520 yr Author I have a shipping file that has a record for each customer purchase as follows: Record 1 Name: joe Smith Address: 45 J st Item purchased: widget 34 Weight 5oz Record 2 Name: joe Smith Address: 45 J st Item purchased: widget 57 Weight 10oz Record 3 Name: joe Smith Address: 45 J st Item purchased: widget 16 Weight 5oz How can I determine the total weight for this customer when all three of the widgets are in separate records? I think a self join relationship would work somehow, or creating a new record with globals for the weights?? Attached is my work on a script to find the duplicate names I am close but I have hit a wall. Any help would be appreciated. Thank you.
March 7, 200520 yr You'd be better of using a relational design for this. Put the customers in one table. Put the item and weight in another table. Link the two using a CustID field (do not use the customer name). Calculating weight would then be easy... Sum(Items::Weight).
March 7, 200520 yr You'd be better of using a relational design for this. Put the customers in one table. Put the item and weight in another table. Link the two using a CustID field (do not use the customer name). Calculating weight would then be easy... Sum(Items::Weight).
March 7, 200520 yr You'd be better of using a relational design for this. Put the customers in one table. Put the item and weight in another table. Link the two using a CustID field (do not use the customer name). Calculating weight would then be easy... Sum(Items::Weight).
Create an account or sign in to comment