General information
Category:
Coding, syntax & commands
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
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