首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >‘’PLS 00103‘和'ORA-06550’错误

‘’PLS 00103‘和'ORA-06550’错误
EN

Stack Overflow用户
提问于 2018-10-02 13:21:46
回答 4查看 60关注 0票数 0

我有几个块无法在Oracle SQL Developer 18.2.0.183中运行。我不确定我的代码块中是否遗漏了什么,或者我是否需要对开发人员进行一些更改。下面的代码块输出"Error starting at line :1 in command -“。(用于声明)。

代码语言:javascript
复制
declare
total_purchases number(7,2);
begin
total_purchases :=20;
case
when (total_purchases>200) then dbms_output.put_line(‘high’);
when (total_purchases>100) and total_purchases<200) then dbms_output.put_line(‘mid);
when (total_purchases<100) then dbms_output.put_line(‘low’);
end case;
end

它还输出以下内容:

任何帮助都是非常感谢的。谢谢。

EN

回答 4

Stack Overflow用户

发布于 2018-10-02 13:40:39

我用"^“标记

代码语言:javascript
复制
declare
  total_purchases number(7,2);
begin
  total_purchases :=20;
  case 
       when (total_purchases>200) then dbms_output.put_line('high');
       when ((total_purchases>100) and total_purchases<200) then dbms_output.put_line('mid');
            ^                                                                             ^
       when (total_purchases<100) then dbms_output.put_line('low');
  end case;
end;
   ^
票数 1
EN

Stack Overflow用户

发布于 2018-10-02 13:24:46

你有两个打字错误

代码语言:javascript
复制
when (total_purchases>100) and total_purchases<200) then dbms_output.put_line(‘mid);

替换为

代码语言:javascript
复制
when (total_purchases>100 and total_purchases<200) then dbms_output.put_line(‘mid‘);
票数 0
EN

Stack Overflow用户

发布于 2018-10-02 13:25:00

使用单引号('')未正确定义大小写

代码语言:javascript
复制
declare
total_purchases number(7,2);
begin
   total_purchases :=20;
   case
      when (total_purchases>200) then dbms_output.put_line('high');
      when (total_purchases>100) and total_purchases<200) then 
      dbms_output.put_line('mid');
      when (total_purchases<100) then dbms_output.put_line('low');
   end 
end
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52602434

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档