如何在oracle apex 5.1中计算多行?

时间:2017-10-02 10:35:44

标签: oracle11g oracle-apex oracle-apex-5.1

我是oracle apex 5.1中的新手,但我想要计算多行如下:

enter image description here

所有计算都以报表形式自动生成:

row/column1.Basic Salary =($25000)
row/column2.Home rent (10% of basic)
row/column3.Medical_cost(10% of basic)
row/column4.Entertainment($800)
row/column5.Gross Amount=(all above amount)
row/column6.Daily salary(month count 30 days)=
*deduction (Minus from Gross amount)*
late free=
advance/loan=
other deduction amount=
Net Payable amount = How ?

请帮帮我。

1 个答案:

答案 0 :(得分:0)

我不确定我理解你的问题,但我会尽力帮助: 我会使用SQL来构建必要的计算,它比编写javascript或plsql更容易。 在不知道表结构的情况下,我会这样做:

select
  base_salary, 
  base_salary*.10 as "Home Rent",
  base_salary*.10 as "Medical_cost",
  Entertainment,
  base_salary+base_salary*.10+base_salary*.10+Entertainment as "Gross amount"
  base_salary/30* as "Daily salary"
from table_A

我所展示的是,您可以在不进行任何编程或复杂查询的情况下逐行构建计算。