Hi,
In my file I have some records which are having the same values except one value.
Following is the example
Name Age Salary
Muthu 40 10000
Jamie 35 25000
Rich 45 15000
Julie 32 10000
Muthu 40 5000
Julie 32 2500
Jamie 35 1000
Muthu 40 2000
from the above records, the fields NAME and AGE are having same values for the records while Salary is having different values.
I want to sum up the Salary by selecting the Distinct records. I need the out put as follows
Muthu 40 17000
Jamie 35 26000
Rich 45 15000
Julie 32 12500
I need to use SQL statements for this in my SQLRPGLE program.
Let me know how to write the query..
Thanks for the assistance. It is bit urgent..
Muthu
In my file I have some records which are having the same values except one value.
Following is the example
Name Age Salary
Muthu 40 10000
Jamie 35 25000
Rich 45 15000
Julie 32 10000
Muthu 40 5000
Julie 32 2500
Jamie 35 1000
Muthu 40 2000
from the above records, the fields NAME and AGE are having same values for the records while Salary is having different values.
I want to sum up the Salary by selecting the Distinct records. I need the out put as follows
Muthu 40 17000
Jamie 35 26000
Rich 45 15000
Julie 32 12500
I need to use SQL statements for this in my SQLRPGLE program.
Let me know how to write the query..
Thanks for the assistance. It is bit urgent..
Muthu
Comment