MySQL Forums
Forum List  »  PHP

merge
Posted by: Kenneth Soona
Date: June 04, 2005 04:58AM

i need a simple script or sql-query for merging datasets with similar values...

my english isn't good... so i try to explain it with an example:


id__artikel_nr__variation_nr__menge__user
1___23________4 ___________5_____12
2___1_________2 ___________3_____665
4___156_______1___________12_____12
12__1_________2 ___________2_____665


there is one record (id: 2 and id: 12), with same artikel_nr, variation_nr and user.

is there any possibility to get only ONE dataset?

new dataset:

newId(ex. 45)
artikel_nr 1
variation_nr 2
menge 5 (sum!)
user 665


thx

Options: ReplyQuote


Subject
Written By
Posted
merge
June 04, 2005 04:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.