小弟在oracle中写啦个简单的存储过程
create or replace procedure jianbiao
as
begin
execute immediate ' create table UU as
select t.studentid,
t.studentname||“努力”姓名,
t.telephone,
t.年级,
t.班级,
t.教师,
t.任课教师,
t.pay,
t.subject,
t.语文,
t.数学,
t.外语,
t.历史,
t.地理,
t.生物
from (select a.studentid,
a.studentname,
a.telephone,
a.gradeno 年级,
a.classno 班级,
a.teacher 教师,
b.teachername 任课教师,
b.pay,
b.subject,
c.studentid 学生号,
case
when chinese >= 60 then
“及格”
else
“不及格”
end 语文,
decode(sign(c.math - 60), 1, “及格”, 0, “及格”, “不及格”) 数学,
case
when c.english >= 60 then
“及格”
else
“不及格”
end 外语,
case
when c.history >= 60 then
“及格”
else
“不及格”
end 历史,
case
when c.geography >= 60 then
“及格”
else
“不及格”
end 地理,
case
when c.biological >= 60 then
“及格”
else
“不及”
end 生物
from student_table a
full join teacher_table b
on a.teacher = b.teachername
full join grade_table c
on a.studentid = c.studentid) t
where (t.语文 = “不及格” or t.数学 = “不及格” or t.外语 = “不及格” or t.历史 = “不及格” or
t.地理 = “不及格” or t.生物 = “不及格”)
and (t.studentid is not null)
order by t.studentid' ;
end;
建立成功 并且也没有报错但是在调用的时候却报
ORA-00911: 无效字符
ORA-06512 :在 “system.jianbiao”,line4
ORA-06512:在 line2
查看显示的是第二行execute immediate ' create table UU as
为无效字段。
请问大侠们 为什么呀
|