• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mystery on why compute oonly calculates for "Total" column

 
sid alam
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an employer table with the following columns
employer
DepartNo | EmployerName | Salary | Commission | Job
How comes I am not able to calculate total for salary and commision but it calculates the total(sum) for "Total"???

col my_column1 HEADING 'Monthly Salary'
col my_column2 HEADING 'Annual Commission'
BREAK on DepartNo skip 1
compute SUM OF my_column1, my_column2, total ON DepartNo
select DepartNo , Job "Job", employerName "Name", Salary my_column1 , Commission my_column2, sal*12+(nvl(comm,0)) "Total" from employer
order by deptno;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic