cancel
Showing results for 
Search instead for 
Did you mean: 

how to add different numeric fields

Former Member
0 Kudos

hai,

How to sum the different numeric fields like eno,esal and dno for a table EMP between eno= 51 to 57 of 100 records.

Please provide the code for this.

regards,

bhargav.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

first, i fully agree with Max. Wrong forum!

second, hard to understand what you want to do, but if you want to sum up the colummns for all rows where eno between 51 & 57 try this:

data: sum_eno type i, sum_esal type i, sum_dno type i.

select sum( eno ) sum( esal ) sum( dno )

from EMP into (sum_eno, sum_esal, sum_dno)

where eno between 51 and 57.

regards,

anton

maximilian_schaufler
Active Contributor
0 Kudos

Hi,

this is not the right place for such questions, be sure to look for the appropriate forum.

I also saw that you posted the same question in multiple forums - this is not something appreciated here, please do not do this again in the future. Look for the right forum, and post only one thread with the same question.

Max