此过程出现以下错误。
create or replace procedure shedule(grad IN varchar2) as
cursor cur(grad varchar2) is
select s.departments dep, s.groups gr, dis.disc_name diname, t.teach_fio teacher, s.type, s.exam_date,s.exam_time, s.kabinet
from sessions10 s, disciplines10 dis, teachers10 t
where dis.disc_id = s.disc_id and t.teach_id = s.teach_id
order by s.groups
schrow cur%ROWTYPE;
departments varchar2(15);
groups number(10);
disciplines varchar2(15);
begin
DBMS_OUTPUT.enable;
for schrow in cur(grad) LOOP
departments := schrow.dep;
groups := schrow.gr;
disciplines := schrow.diname;
dbms_output.put_line(departments||' '||groups||' '||disciplines||' '||schrow.teacher||);
end LOOP;
end;
给出:
ERROR at line 19: PLS-00103: Encountered the symbol "¿"
1. create or replace procedure shedule(grad IN varchar2) as
2. cursor cur(grad varchar2) is
3. select s.departments dep, s.groups gr, dis.disc_name diname, t.teach_fio teacher, s.type, s.exam_date,s.exam_time, s.kabinet
谁能说一下这有什么问题吗?
谢谢。
在sql中创建过程。
两个明显的错误:
||
修复后:
create or replace procedure shedule(grad IN varchar2) as
cursor cur(grad varchar2) is
select s.departments dep, s.groups gr, dis.disc_name diname, t.teach_fio teacher, s.type, s.exam_date,s.exam_time, s.kabinet
from sessions10 s, disciplines10 dis, teachers10 t
where dis.disc_id = s.disc_id and t.teach_id = s.teach_id
order by s.groups; --> missing semi-colon
schrow cur%ROWTYPE;
departments varchar2(15);
groups number(10);
disciplines varchar2(15);
begin
DBMS_OUTPUT.enable;
for schrow in cur(grad) LOOP
departments := schrow.dep;
groups := schrow.gr;
disciplines := schrow.diname;
dbms_output.put_line(departments||' '||groups||' '||disciplines||' '||schrow.teacher); --> superfluous ending ||
end LOOP;
end;
不过,你举报了
遇到符号“¿”
该代码中有任何“垃圾”吗?尝试删除第 17 行之后的所有内容并从头开始输入。