Information générale
Catégorie:
Codage, syntaxe et commandes
Hello,
I have a table which contains the following fields:
order_id
rep1_id
rep2_id
rep3_id
com1_pct
com2_pct
com3_pct
How can I use a sql statement to reorganize the table which contains:
order_id
sale_id
commission
so if rep1, rep2,rep3 are unique, the record will become 3 records and teh commission will be com1_pct, com2_pct and com3_pct, if rep1,rep2 and rep3 are same, the record will be still one record but commission will be the sum of the com1_pct, com2_pct and com3_pct.
thanks
sherry
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement