PLS00103:遇到符号“END”

时间:2017-06-10 17:38:27

标签: sql oracle procedure

这是我的程序,它给了我PLS00130:遇到符号“END”错误。问题出在哪儿??我错过了什么?

CREATE OR REPLACE PROCEDURE GETHEATDATA(HEATNO NUMBER)
IS
BEGIN
  FOR program IN (
    select program_id from rml_program where heat_id=HEATNO
    )
  LOOP
  select
  program.program_id,
    program.job_id,
    program.grade,
    count(t.semiproduct_cnt),
    max(t.charging_date),
    min(t.charging_date),
    max(t.reheating_date),
    min(t.reheating_date),
    count(t.rejecting_date),
    count(t.rolling_date),
    count(t.loss_date)
    from
    rml_semiproduct t
    where
    t.program_id = program.program_id;
  END LOOP;
  END;
  END GETHEATDATA;

1 个答案:

答案 0 :(得分:1)

2件事。首先,删除END GETHEATDATA,其次,您忘记加入计划表。

相关问题