Ok.. I have a Items table with the following fields:
ProductCode Value
The ProductCode is not unique and multiple entries of the same product code is allowable.
Now I need, using an sql statement, to display only distinct ProductCode but also the sum Value. I know how to display distinct records using the following sql statement: SELECT DISTINCT ProductCode FROM Items.
So if I have:
ProductCode Value
0001 2
0001 3
0002 1
0002 2
0002 3
I want to show:
ProductCode Value
0001 5
0002 6
Please help.
ProductCode Value
The ProductCode is not unique and multiple entries of the same product code is allowable.
Now I need, using an sql statement, to display only distinct ProductCode but also the sum Value. I know how to display distinct records using the following sql statement: SELECT DISTINCT ProductCode FROM Items.
So if I have:
ProductCode Value
0001 2
0001 3
0002 1
0002 2
0002 3
I want to show:
ProductCode Value
0001 5
0002 6
Please help.