General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Best way to check a table for duplicates???
Hello once again. It's your for neighborhood novice back for advice.
I have a table that has sale orders. Sometimes the customer does 2 or 3 sales. I would like to check the table for the same customer then combine those records into 1, deleting the others. The cost would then be record1.cost + record2.cost + record3.cost.
I started to use a temp table to compare the two but I keep running into walls. For instance, how to add the cost when I'm comparing the exact same tables to each other. When comparing the two tables, if I have 3 similar records on each one(e.g. same customer name), would the reccount() = 3 or 9?
I would appreciate any help and thanks,
Sunshine
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only