我收到PL/SQL:ORA-00905:缺少关键字错误,当我运行下面的脚本如何在oracle中的where子句中使用case语句?
create or replace procedure testing
(ass_line in char,
curs out sys_refcursor
)
is
begin
open curs for
select asl.Production_Group,asl.last_sequence_nbr
from ASSEMBLY_LINE asl
where(case
when ass_line='551F'
then asl.assembly_line in('551F','551C','551S')
else
asl.assembly_line=ass_line
end);
end;
请帮我
除了语义上不正确'case'表达,它不允许选择'into'游标变量使用'开放 for'语句 –
@Nicholas克拉斯诺夫。谢谢你的回复。我更新了我的帖子。我运行该过程中提到的过程,但在编译过程时,我正在丢失关键字。 – BabyboBNukes
查看Tony的和/或David的回答。 –