This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes mystery on why compute oonly calculates for Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "mystery on why compute oonly calculates for "Total" column" Watch "mystery on why compute oonly calculates for "Total" column" New topic
Author

mystery on why compute oonly calculates for "Total" column

sid alam
Greenhorn

Joined: Dec 01, 2001
Posts: 27
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;
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: mystery on why compute oonly calculates for "Total" column
 
It's not a secret anymore!