oracle rep文件怎么打开,oracle rep

ttitle 'allbymonth'

btitle '2007-2008'

break on emp_worksheet skip 1 on report

compute avg of wag_salary on emp_worksheet

set pagesize 100spool d:/test.txtSELECT  employee.emp_WORKSHEET, employee.EMP_RECRUIT,employee.EMP_NAME,decode(WAG_YEAR ,2008, ROUND(NVL(WAG_SUBTOTAL,0)+DECODE(WAG_CONVERSION_FLAG,1,WAG_ANTERIOR+NVL(WAGE.WAG_BONUS_AMT1,0)+NVL(WAGE.WAG_BONUS_AMT2,0)+NVL(WAGE.WAG_BONUS_AMT3,0)+NVL(WAGE.WAG_BONUS_AMT4,0)+NVL(WAGE.WAG_POINT_BONUS,0) +NVL(WAGE.WAG_EXTRAALLOW,0),0,WAG_ANTERIOR)-NVL(WAGE.WAG_SUBTOTAL2,0)+NVL(WAGE.WAG_ROOM_N_BOARD_CHARGE,0),0)+DECODE(WAGE.WAG_CONVERSION_FLAG,0,ROUND(NVL(WAGE.WAG_BONUS_AMT1,0)+NVL(WAGE.WAG_BONUS_AMT2,0)+NVL(WAGE.WAG_BONUS_AMT3,0)+NVL(WAGE.WAG_BONUS_AMT4,0)+NVL(WAGE.WAG_POINT_BONUS,0) +NVL(WAGE.WAG_EXTRAALLOW,0),0),1,0),2007,WAG_SALARY)  AS WAG_SALARY FROM WAGE,EMP,employee WHERE  EMP.EMP_ID  =WAGE.WAG_ID  and employee.emp_id=emp.emp_id  and EMP. EMP_TIMES=(select max(emp_times) from emp e where e.emp_id=emp.emp_id) and emp_state='I'  AND ((WAG_YEAR=2007  AND WAG_MONTH in('11','12')) OR (WAG_YEAR=2008 AND WAG_MONTH NOT IN('11','12')))   ORDER BY  employee.emp_WORKSHEET ;spool off

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值