1
這是代碼:的Oracle PL/SQL錯誤PLS-00103
set serveroutput ON;
DECLARE
id_emp NUMBER := '&EmpleadoNumero';
n_commission DOUBLE;
BEGIN
SELECT i.id,
Decode(i.commission_pct, SUM(i.commission_pct) > 100000,
i.commission_pct + (i.commission_pct * .10),
SUM(i.commission_pct) > 100000
AND SUM(i.commission_pct) < 1000000,
i.commission_pct + (i.commission_pct * .15),
SUM(i.commission_pct) > 1000000,
i.commission_pct + (i.commission_pct * .20),
0) N_Commission
FROM s_emp i
inner join s_ord S
ON (i.id = S.sales_rep_id);
INTO id_emp, n_commission;
dbms_output.Put_line('El empleado numero: '
|| idemp
|| ' tiene una nueva comisión de: '
|| n_comision);
END;
,當我嘗試它,我得到:ORA-06550 PLS-00103錯誤
你SE選擇權聲明沒有意義。你想在這裏計算什麼? – Noel 2014-08-27 07:58:27
給定員工的佣金百分比 – Ilemar 2014-08-27 09:00:12