deleting duplicates

Ryuu

puzzled and confused
Local time
Yesterday, 22:49
Joined
Feb 11, 2008
Messages
2
my problem is this:
i have a table that has three data feilds
id, amount1, and, ammount2
i want to allow the user to imput duplicates, but i want my database to delete all but one of the duplicate feilds, and add the ammounts of the deleted records to the ammounts of the non deleted duplicate...
 
you will need a modular function for this. Post the question in that forum...
 
Actually, I think you need to change your approach. I would capture all of the amounts as individual records and then sum the transactions by ID number to get the total. Updating a stored value can get messy when you have more than one user, or when the application crashes, plus you have an audit trail with the individual records.
 
Actually, I think you need to change your approach. I would capture all of the amounts as individual records and then sum the transactions by ID number to get the total. Updating a stored value can get messy when you have more than one user, or when the application crashes, plus you have an audit trail with the individual records.
my database is designed for individal use, i also want the user to be able to add new data in the query
 

Users who are viewing this thread

Back
Top Bottom