• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

mystery on why compute oonly calculates for "Total" column

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;
 
reply
    Bookmark Topic Watch Topic
  • New Topic